Accept Only Numbers in Textbox
Do you want to input only numbers in a textbox? and just want a few lines of code ?Well this code is for you....See it for yourself....Want to know more of my codes then email me....
Rate Accept Only Numbers in Textbox
(5(5 Vote))
'In the KeyPress event of a textbox
'Shall we say you have put one textbox in your form
'Here it goes
Private Sub text1_KeyPress(Keyascii as Integer)
Select case Keyascii
case asc(vbcr)
Keyascii=0
case 8,46
case 47 to 58
case else
Keyascii=0
End Select
End Sub
Accept Only Numbers in Textbox Comments
No comments yet — be the first to post one!
Post a Comment