Function Character Types Class

IsDigit

"Is Character Numeric Digit" Return True if the character with ASCII value vCharCode is a numeric digit ("0", "1", .. "9"). Return False otherwise.

Signature (Visual Basic / VBA)

Public Function IsDigit( _
    ByVal vCharCode As Integer _
    ) As Boolean

Code Example

    IsDigit(Asc("7")) = True
    IsDigit(Asc("F")) = False
    IsDigit(7) = False

Parameters

Parameter Description
vCharCode Character whose ASCII value is checked to determine if it belongs to the numeric digit class.

Notes & Version History

Note Function will generate a runtime error if vCharCode is not between 0 (zero) and 255 inclusive.