CodeItBetter Programming Another VB Programming Blog

How to Check a Social Security Number for Validity

Posted on January 4, 2009
1
2
3
4
5
6
7
8
'String Manipulation - How to Check a Social Security Number for Validity
Option Explicit
 
Public Function IsValidSSN(ByVal SSN As String) As Boolean
'Determines if SSN is a valid social security number
'requires SSN to be in either "#########" or "###-##-####" format
    IsValidSSN = (SSN Like "###-##-####") Or SSN Like ("#########")
End Function
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.