Validates a two character postal state code
Validates a two character postal state code
Rate Validates a two character postal state code
(2(2 Vote))
' Purpose: Checks to see if strState is a valid postal state code.
' In: strZIP - Candidate State postal code
' Out:
' Returns: True - if strState is a valid postal state code.
' False - if it is not
' Date: 1/16/2000
' Programmer: Speed Demon
' Last Modified:
' Note: Not case sensitve
Select Case UCase(strState)
Case "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", _
"DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", _
"KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", _
"MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", _
"ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", _
"TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"
ValidateState = True
Case Else ' It's not a postal state code.
ValidateState = False
End Select
End Function
Validates a two character postal state code Comments
No comments yet — be the first to post one!
Post a Comment