VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Simple code allows print into the TextBox numbers only.

Dr. Dre  (1 Submission)   Miscellaneous   Visual Basic 5.0   Unknown Difficulty   Fri 9th June 2000   Mon 8th February 2021

Simple code allows print into the TextBox numbers only.

API Declarations



Public Sub NUMBERS_ONLY(KeyAscii As Integer, TXT As TextBox)
Select Case KeyAscii
'negotive numbers
'KeyAscii; 45 is "-"
Case 45
If Len(TXT.Text) >= 1 Then
KeyAscii = 0
End If
'KeyAscii; 8 is "Backspace", 46 is "." decimal,
' 48-57 is "0-9"
Case 8, 46, 48 To 57
KeyAscii = KeyAscii
Case Else
KeyAscii = 0
End Select
End Sub


Rate Simple code allows print into the TextBox numbers only. (1(1 Vote))
Simple code allows print into the TextBox numbers only..bas

Simple code allows print into the TextBox numbers only. Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters