Lot's of threads on this here's one of many thread222-608927
"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
In fact, it seems to me it may be better to put checking code into the KeyPress() subroutine of the textbox into which the user is typing the password:
Private Sub txtPassword_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc(" ") Or KeyAscii = vbTab Then
' Remove the keystroke, so the text box never sees it.
KeyAscii = 0
End If
End Sub
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.