I want keypress event sample code.. I have a textbox and I want only numbers to be allowed inside the textbox.. help me out plz..thanks in advance.
Private Sub Text1_KeyPress(KeyAscii As Integer)
If (58 > KeyAscii > 47) Then
MsgBox "Enter only Numbers"
Text1.Text = ""
But this din’t work.. plz help me out