Function Character Types Class

IsPrint

"Is Character Printable" Return True if the character with ASCII value vCharCode is a "printable" character; return False otherwise. The "print" classification includes alphanumeric (alphabetical and numeric), punctuation, and whitespace characters. Combination of characters from the "graph" and "whitespace" classifications.

Signature (Visual Basic / VBA)

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

Code Example

    IsPrint(Asc("C")) = True
    IsPrint(Asc("2")) = True
    IsPrint(Asc(" ")) = True
    IsPrint(Asc(vbLf)) = False

Parameters

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

Notes & Version History

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