Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   Validate characters such as % ' " (https://www.askmehelpdesk.com/showthread.php?t=176102)

  • Jan 24, 2008, 07:41 AM
    yuffie
    Validate characters such as % ' "
    Hi, I'm having a problem with validating characters in a textbox on the event of key pressed.
    I need to validate that the user's input is not % ' " ? or !
    and im having a problem validating password type textbox too.

    the methods i tried are by using e.keychar and Asc(e.keychar)
    none of them are working. if i used that to validate character '
    it's working, but it's not working for other characters. i guess it's because for other characters, you have to press Shift + something to get it.

    does anyone know how to do this?

    oh, and does anyone know how to display " in vb2005? Cause the string in vb 2005 is marked by ". so when i type " it'll just end the string. Thanks a lot :)
  • Jan 24, 2008, 08:12 AM
    yuffie
    Opps.. turned out I used the wrong connector for the If clause..
    I was using And, where it was supposed to be Or
    Hehehe :)

  • All times are GMT -7. The time now is 02:51 AM.