This sample line of codes will show you on how to filter all
the special character on your keyboard that will inputted by
the user, this is very important to avoid the typo error, so we
want to trap it via this code
If KeyAscii >= 1 And KeyAscii <= 7 Or _
KeyAscii >= 9 And KeyAscii <= 47 Or _
KeyAscii >= 58 And KeyAscii <= 64 Or _
KeyAscii >= 91 And KeyAscii <= 96 Or _
KeyAscii >= 123 And KeyAscii <= 255 Then
KeyAscii = 0
End If
By determining the equivalent value of each character
you can browse your ASCII code,on the code given
i will not include the 65 to 90 because this range are holds
the value of A-Z and 48-57 that holds the range 0-9.
Hope this will help
Good Luck (^_^)
the special character on your keyboard that will inputted by
the user, this is very important to avoid the typo error, so we
want to trap it via this code
If KeyAscii >= 1 And KeyAscii <= 7 Or _
KeyAscii >= 9 And KeyAscii <= 47 Or _
KeyAscii >= 58 And KeyAscii <= 64 Or _
KeyAscii >= 91 And KeyAscii <= 96 Or _
KeyAscii >= 123 And KeyAscii <= 255 Then
KeyAscii = 0
End If
By determining the equivalent value of each character
you can browse your ASCII code,on the code given
i will not include the 65 to 90 because this range are holds
the value of A-Z and 48-57 that holds the range 0-9.
Hope this will help
Good Luck (^_^)
Tags:
VB6 Functions,
Visual Basic 6.0
Leave a comment