by Nagendran (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 16th January 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get only numbers in Text Box
API Declarations
'Insert a Text Box in a Form and named as TxtNumber
Private Sub TxtNumber_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 48 To 57, 8 ' Numbers 0 to 9 and Backspace key
Case Else: KeyAscii = 0
End Select
End Sub