Share via


Print and Display Constants

When you call print and display functions, you can use the following constants in your code in place of the actual values.

ControlChars Module Members

Member

Constant

Equivalent

Description

CrLf

vbCrLf

Chr(13) + Chr(10)

Carriage-return/linefeed character combination.

Cr

vbCr

Chr(13)

Carriage-return character.

Lf

vbLf

Chr(10)

Linefeed character.

NewLine

vbNewLine

Chr(13) + Chr(10)

Newline character.

NullChar

vbNullChar

Chr(0)

Character having value 0.

n/a

vbNullString

String having value 0

Not the same as a zero-length string (""); used for calling external procedures.

n/a

vbObjectError

-2147221504

Error number. User-defined error numbers should be greater than this value. For example:

Err.Number = vbObjectError + 1000

Tab

vbTab

Chr(9)

Tab character.

Back

vbBack

Chr(8)

Backspace character.

FormFeed

vbFormFeed

Chr(12)

Not useful in Microsoft Windows.

VerticalTab

vbVerticalTab

Chr(11)

Not useful in Microsoft Windows.

Quote

n/a

Chr(34)

Quotation mark character (" or ') used to enclose values.

Requirements

Namespace: Microsoft.VisualBasic

**Module:**Constants

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

See Also

Concepts

Intrinsic Constants and Enumerations

Constants Overview

Constants Declared by Visual Basic

Reference

Print, PrintLine Functions

Write, WriteLine Functions