Function Character Types Class

IsXDigit

"Is Character Hexadecimal Digit" Return True if the character with ASCII value vCharCode is a hexadecimal digit ("0".."9", "A".."F", "a".."f"). Return False otherwise.

Signature (Visual Basic / VBA)

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

Code Example

    IsXDigit(Asc("9")) = True
    IsXDigit(Asc("C")) = True
    IsXDigit(Asc("c")) = True
    IsXDigit(Asc("G")) = False

Parameters

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

Notes & Version History

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