VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Checks the ASCII code to validate characters.

by Rone (9 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 14th May 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Checks the ASCII code to validate characters.

Rate Checks the ASCII code to validate characters.



    Dim intASCII As Integer
    
    intASCII = Asc(strChar)
    
    'The following are the accepted characters in the ID field.
    '45--> "-"
    '48-57-->"0-9"
    '65-90 -->"A-Z"
    '95-->"_"
    '97-199-->"a-z"
    
    If (intASCII = 45) Or (intASCII > 47 And intASCII < 58) Or (intASCII > 64 And intASCII < 91) Or (intASCII = 95) Or (intASCII > 96 And intASCII < 123) Then
    Else
        Check_ASCII = True
    End If
    
End Function

Download this snippet    Add to My Saved Code

Checks the ASCII code to validate characters. Comments

No comments have been posted about Checks the ASCII code to validate characters.. Why not be the first to post a comment about Checks the ASCII code to validate characters..

Post your comment

Subject:
Message:
0/1000 characters