Constants module

The Constants module holds the constants of the VBA package that belong to no enumeration, such as vbCrLf, vbNullString and vbObjectError, and lists the package’s enumerations.

Constants

vbBack
The backspace character — Chr(8).
vbCr
The carriage return character — Chr(13).
vbCrLf
The carriage return + linefeed pair — Chr(13) & Chr(10).
vbFormFeed
The form feed character — Chr(12).
vbLf
The linefeed character — Chr(10).
vbNewLine
The platform-appropriate newline character. In twinBASIC, identical to vbCrLf.
vbNullChar
The null character — Chr(0).
vbNullPtr
A null pointer of type LongPtr (zero), for use with API declarations that take a pointer or handle argument.
vbNullString
A null string pointer. Distinct from the zero-length string ""; used when calling external procedures that differentiate between a null pointer and an empty string.
vbObjectError
The base value for user-defined error numbers — &H80040000 (-2147221504). User-defined error numbers should be greater than this; for example, Err.Raise vbObjectError + 1000.
vbPtrSize
The size in bytes of a pointer in the current build, a Long: 4 in a 32-bit build and 8 in a 64-bit build. It is a constant, so it can be used in a constant expression and in an array bound; the size of a LongPtr in the same build. It is not a compiler constant: #If vbPtrSize = 8 Then is always false, and conditional compilation tests Win64 instead.
vbTab
The tab character — Chr(9).
vbVerticalTab
The vertical tab character — Chr(11).

Enumerations