by Deepak Ghosh (4 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 7th September 2003
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
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
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
No comments have been posted about Only 3 Line Coding for Alpha & Numeric Validation Check For A Test Box.. Why not be the first to post a comment about Only 3 Line Coding for Alpha & Numeric Validation Check For A Test Box..