Restrict the Entry of Textbox data to Numeric Fields.
Restrict the Entry of Textbox data to Numeric Fields.
API Declarations
Useful Code
Paste the Code in the Text Box's Key Press Event.
It check for the Key which is pressed if it 0 to 9 it allows the Entry others not Allowed. Its also allows the Back space to delete text backwards if there is some mistake.
Rate Restrict the Entry of Textbox data to Numeric Fields.
(1(1 Vote))
If KeyAscii < 48 Or KeyAscii > 57 Then
If KeyAscii <> 8 And KeyAscii <> 13 Then
KeyAscii = 0
End If
End If
End Sub
Restrict the Entry of Textbox data to Numeric Fields. Comments
No comments yet — be the first to post one!
Post a Comment