Sub TextBox1_KeyPress (key)
If (Asc(key) < 48 OR Asc(key) > 59) AND Asc(key) <> 8 Then
' allow 0 to 9 and backspace keys
textbox1.IgnoreKey
End If
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.