- Home
·
- String Manipulation
·
- Simple code to allow only characters to be typed into a textbox without using any API's .DELETE,
Simple code to allow only characters to be typed into a textbox without using any API's .DELETE,
Simple code to allow only characters to be typed into a textbox without using any API's ."DELETE", "BACKSPACE","SPACE" AND "." keys also work.
Rate Simple code to allow only characters to be typed into a textbox without using any API's .DELETE,
(1(1 Vote))
'Simple code to allow only characters to be typed into a textbox without
'using any API's ."DELETE", "BACKSPACE","SPACE" AND "." keys also work. Nothing
'happens when numbers are typed.
'code
Private Sub Text1_KeyPress(KeyAscii As Integer)
'ascii 8 stands for-backspace,46-delete ,32-space,65-90 stands for A to Z and 97-122 stands for a to z
If KeyAscii <> 8 And KeyAscii <> 46 and KeyAscii <>32 And KeyAscii < 65 Or KeyAscii > 90 And KeyAscii < 97 Or KeyAscii > 122 Then
KeyAscii = 0
End If
End Sub
Simple code to allow only characters to be typed into a textbox without using any API's .DELETE, Comments
No comments yet — be the first to post one!
Post a Comment