Text box masking

Last post 06-05-2007, 5:49 PM by Hesham A.Megid. 0 replies.
Sort Posts: Previous
  • Text box masking

     06-05-2007, 5:49 PM

    • Joined on 02-08-2007
    • Alexandria, Egypt
    • Posts 11
    • Top 25 Contributor

    Hello,

    I'm using the code below to mask a text box to accept numbers from 0 to 9 only. The only problem is that it doesn't let you use the backspace button when typing in the text box.


    If Asc(e.KeyChar) < Asc("0") Or Asc(e.KeyChar) > Asc("9") Then
    e.Handled = True
    Beep()
    End If

    Any suggestions??

    Thanks in advance :)


    Hesham A.Megid
    First year student at the College of Computing and Infromation Technology, AAST
View as RSS news feed in XML





© All rights are reserved