Count Alphabetical characters using VBScript

In order to count Alphabetical characters using VBScript in a string, first we need to get the characters from the given string, one char at a time using the mid function of VBScript. Then check if the character is a numeric character. If no numeric character is found using isNumeric function, the given string is an alphabetical string.

Example code: Count alphabetical characters using VBScript

Function countAlphaChars()

    Dim oStr
    Dim oLength
    Dim oChar
    Dim iCounter


    For iCounter=1 to oLength

        If not isnumeric (mid(oStr,iCounter,1)) then
        End if

    print oAlphacounter
End Function

You may also read

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.