Jewel142
ISP
- Jun 17, 2009
- 39
Hi Everyone,
Is there a way to limit the types of characters in a user input box (not a text box).
I have a text box that I use for capturing social security numbers and have a key press event set up so that they can only enter numbers. However, if they enter less than 9 characters or skip over the field, I have a Loop set up
Do
SSN = InputBox("Enter a 9-digit social security number (no
dashes)", "Soc Sec Number")
Loop Until SSN.Length = 9
ssnTextBox.Text = SSN
My problem is if they enters an alpha character, my program accepts the alpha character and incorporates it into my string format so that the social looks something like this 123-4t-67o9
Any suggestions?
Thanks!
Jewel
Is there a way to limit the types of characters in a user input box (not a text box).
I have a text box that I use for capturing social security numbers and have a key press event set up so that they can only enter numbers. However, if they enter less than 9 characters or skip over the field, I have a Loop set up
Do
SSN = InputBox("Enter a 9-digit social security number (no
dashes)", "Soc Sec Number")
Loop Until SSN.Length = 9
ssnTextBox.Text = SSN
My problem is if they enters an alpha character, my program accepts the alpha character and incorporates it into my string format so that the social looks something like this 123-4t-67o9
Any suggestions?
Thanks!
Jewel