Public Function CheckUSState(ByVal State As String) As Boolean If Len(State) = 2 And InStr(",AL,AK,AZ,AR,CA,CO,CT,DE,DC,FL,GA,HI,ID,IL,IN,I" _ & "A,KS,KY,LA,ME,MD,MA,MI,MN,MS,MO,MT,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,P" _ & "A,RI,SC,SD,TN,TX,UT,VT,VA,WA,WV,WI,WY,", "," & UCase(State) & ",") > _ 0 Then CheckUSState = True End If End Function |