Check for extended ASCII
Checks to make sure the contents of a TextBox or String are only standard ASCII; If it has any extended ASCII, the function will return False.
Assumes
Use like this:
If Valid_ASCII(Text1) = False Then
MsgBox "Invalid chars!"
Exit sub
End If
Rate Check for extended ASCII
(3(3 Vote))
Function Valid_ASCII(Text As String)
For x = 1 To Len(Text)
If Asc(Mid(Text, x, 1)) > 126 Or Asc(Mid(Text, x, 1)) < 32 Then
Valid_ASCII = False
Exit Function
End If
Next x
Valid_ASCII = True
End Function
Check for extended ASCII Comments
No comments yet — be the first to post one!
Post a Comment