Is there a way to make the textbox stop typing when a user types numbers? I don't want an error message, I'd just like the user to be able to insert 10 numbers and then it shouldn't add any newly typed numbers.
The code I have so far is
Private Sub TextBox1_KeyPre ss(ByVal sender As Object, ByVal e As System.Windows. Forms.KeyPressE ventArgs) Handles TextBox1.KeyPre ss
If Not IsNumeric(e.Key Char) Then
MessageBox.Show ("Please insert numbers only.", "Error!", MessageBoxButto ns.OK, MessageBoxIcon. Exclamation)
e.KeyChar = Nothing
End If
End Sub
The code I have so far is
Private Sub TextBox1_KeyPre ss(ByVal sender As Object, ByVal e As System.Windows. Forms.KeyPressE ventArgs) Handles TextBox1.KeyPre ss
If Not IsNumeric(e.Key Char) Then
MessageBox.Show ("Please insert numbers only.", "Error!", MessageBoxButto ns.OK, MessageBoxIcon. Exclamation)
e.KeyChar = Nothing
End If
End Sub
Comment