|
-
Nov 8th, 1999, 04:43 AM
#1
Thread Starter
Hyperactive Member
I want to be able to keep all other information other than numbers from being entered into a text box. How can I do this?
------------------
Ryan
[email protected]
ICQ# 47799046
-
Nov 8th, 1999, 04:45 AM
#2
Try this:
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Chr(KeyAscii)) And KeyAscii <> vbKeyBack Then KeyAscii = 0
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Nov 8th, 1999, 04:48 AM
#3
Thread Starter
Hyperactive Member
Yup, that does it! Thanks.
------------------
Ryan
[email protected]
ICQ# 47799046
-
Nov 8th, 1999, 11:04 AM
#4
Hyperactive Member
You can also use a Masked Edit Box with its Mask property set to "########" , up to the number of digits you want.
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
|