|
-
Feb 16th, 2000, 05:26 AM
#1
How do I stop a character(say a *) and a carriage return(pressing enter) from being entered into a textbox?
-
Feb 16th, 2000, 05:49 AM
#2
Trap it in the KeyPress Event, ie.
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc("*") Or KeyAscii = vbKeyReturn Then KeyAscii = 0
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Certified AllExperts Expert
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
|