Why this code doesn't work when I enter - and work on all other caracter?
[code}
Private Function ValidCharacters(InputData As String) As Boolean
Dim Counter As Long
Dim Character As Integer
' Make sure in uppercase, easier for checking
InputData = UCase$(InputData)
' Checks to see if every byte is a letter or number
For Counter = 1 To Len(InputData)
Character = Asc(Mid$(InputData, Counter, 1))
Select Case Character
Case 32, 45, 48 To 57, 65 To 90
Case Else: Exit Function
End Select
Next Counter
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.