Function Character Types Class

IsCntrl

"Is Character Control" Return True if the character with ASCII value vCharCode is a control character (like Ctrl+A..Ctrl+Z). Return False otherwise.

Signature (Visual Basic / VBA)

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

Code Example

    IsCntrl(7) = True
    IsCntrl(Asc("7")) = False
    IsCntrl(Asc(vbLf)) = True
    IsCntrl(Asc(vbCr)) = True

Parameters

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

Notes & Version History

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