|
-
Mar 9th, 2010, 11:10 AM
#1
Thread Starter
Lively Member
[RESOLVED] Limiting textbox characters
Hi I have a program where i want the texbox only to input numbers i have the ascii coding but the problem is that it is a private sub so even when i dont have to put in data into the textbox it still does the ascii check. here is my coding
Private Sub txtfirstname_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 33 To 64, 91 To 96, 123 To 126
MsgBox ("Only letters supported for this field! Please input a name.")
KeyAscii = 0
Exit Sub
End Select
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|