Just put this code in your keypress event in your textbox
Select Case e.KeyChar
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", vbBack
e.Handled = False
Case Else
e.Handled = True
End Select
if you want to change the input length of textbox just click the properties and then change the MaxLength Value.