|
-
Dec 22nd, 2002, 10:15 PM
#1
Thread Starter
Hyperactive Member
Trapping Non Numeric Key
Im trying to trap non numeric key in TextBox but why this code don't Work?
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar < Chr(48) And e.KeyChar > Chr(57) Or e.KeyChar <> Chr(8) Then
e.Handled = True
End If
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
|