Only 3 Line Coding for Alpha & Numeric Validation Check For A Test Box.
Only 3 Line Coding for Alpha & Numeric Validation Check For A Test Box.
API Declarations
'if you like this code just mail me at [email protected]
Dim StrValid As String
Rate Only 3 Line Coding for Alpha & Numeric Validation Check For A Test Box.
(1(1 Vote))
ValidNum KeyAscii
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
ValidAlpha KeyAscii
End Sub
Sub ValidNum(KeyAscii As Integer)
StrValid = "0123456789."
If KeyAscii > 26 Then
If InStr(StrValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0
End If
End Sub
Sub ValidAlpha(KeyAscii As Integer)
StrValid = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz "
If KeyAscii > 26 Then
If InStr(StrValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0
End If
End Sub
Only 3 Line Coding for Alpha & Numeric Validation Check For A Test Box. Comments
No comments yet — be the first to post one!
Post a Comment