G
Guest
Hi
i have the following code to only allow integer values to be entered in a textbox
Can anyone tell me how i can modify this to only allow characters?
Private Sub txtBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtBox1.KeyPres
'ensure that only integers can be entere
If Char.IsNumber(e.KeyChar) The
Exit Su
End I
If Not Char.IsNumber(e.KeyChar) The
e.Handled = Tru
End I
End Su
i have the following code to only allow integer values to be entered in a textbox
Can anyone tell me how i can modify this to only allow characters?
Private Sub txtBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtBox1.KeyPres
'ensure that only integers can be entere
If Char.IsNumber(e.KeyChar) The
Exit Su
End I
If Not Char.IsNumber(e.KeyChar) The
e.Handled = Tru
End I
End Su