String Constants

The following constants are replacements for one or more characters. For instance, to add a line break to a string that’s not being displayed in a web page, you can use a statement like the following:

sMsg = sMsg & vbCrLf

Constant

Value

Description

vbCr

Chr$(13)

Carriage return

vbCrLf

Chr$(10) & Chr$(13)

Carriage return and linefeed characters

vbFormFeed

Chr$(12)

Form-feed character

vbLf

Chr$(10)

Linefeed character

vbNewLine

Platform Specific

New line character

vbNullChar

Chr$(0)

Null character

vbNullString

Zero Length String

Null string

vbTab

Chr$(9)

Tab character

vbVertical Tab

Chr$(11)

Vertical tab character

Get VBScript in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.