For example, if you want to textbox2 allow import of only the digits from 1 to 5 try this:
Code:
Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
If e.KeyChar < Chr(49) Or e.KeyChar > Chr(53) Then e.Handled = True
End Sub
maybe you will need this:
Ascii Table - ASCII character codes and html, octal, hex and decimal chart conversion
I hope that I helped