VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Restricting Textbox to get numbers only as their input.

by Ahamed Saifudeen (11 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 13th March 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Restricting Textbox to get numbers only as their input.

API Declarations


'Create one Textbox and type the following code in the Keypress event of the 'Textbox.
'Send your feedback, suggestions and doubts to [email protected]

Rate Restricting Textbox to get numbers only as their input.



If Not ((KeyAscii>=Asc("0") And KeyAscii<=Asc("9") Or KeyAscii=8) Then
KeyAscii=0
End If
End Sub

Download this snippet    Add to My Saved Code

Restricting Textbox to get numbers only as their input. Comments

No comments have been posted about Restricting Textbox to get numbers only as their input.. Why not be the first to post a comment about Restricting Textbox to get numbers only as their input..

Post your comment

Subject:
Message:
0/1000 characters