How to Filter the Special Characters in Vb6

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 (^_^)
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Leave a comment

Copyright @ Codes-47.Blogspot.Com. Powered by Blogger.