Previous Page
Next Page

Constants

The constants in Tables A-1 through A-6 are built into Microsoft Visual Basic, Scripting Edition (VBScript) and therefore do not need to be defined prior to use. You can use them anywhere in your code to represent the values shown.

Table A-1. String constants

Constant

Value

Description

vbCr

Chr(13)

Carriage return

VbCrLf

Chr(13) and Chr(10)

Carriage returnlinefeed combination

vbFormFeed

Chr(12)

Form feed; not useful in Microsoft Windows

vbLf

Chr(10)

Line feed

vbNewLine

Chr(13) and Chr(10) or Chr(10)

Platform-specific newline character; whatever is appropriate for the platform

vbNullChar

Chr(0)

Character having the value 0

vbNullString

String having value 0

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

vbTab

Chr(9)

Horizontal tab

vbVerticalTab

Chr(11)

Vertical tab; not useful in Microsoft Windows


Table A-2. Comparison constants

Constant

Value

Description

vbBinaryCompare

0

Perform a binary comparison

vbTextCompare

1

Perform a textual comparison


Table A-3. Date and time constants

Constant

Value

Description

VbSunday

1

Sunday

VbMonday

2

Monday

vbTuesday

3

Tuesday

vbWednesday

4

Wednesday

vbThursday

5

Thursday

VbFriday

6

Friday

vbSaturday

7

Saturday

VbUseSystemDayOfWeek

0

Use the day of the week specified in your system settings for the first day of the week

VbFirstJan1

1

Use the week in which January 1 occurs (default)

vbFirstFourDays

2

Use the first week that has at least four days in the new year

vbFirstFullWeek

3

Use the first full week of the year


Table A-4. Date formatting constants

Constant

Value

Description

vbGeneralDate

0

Display a date and/or time. For real numbers, display a date and time. If there is no fractional part, display only a date. If there is no integer part, display time only. Date and time display is determined by your system settings.

vbLongDate

1

Display a date using the long date format specified in your computer's regional settings.

vbShortDate

2

Display a date using the short date format specified in your computer's regional settings.

vbLongTime

3

Display a time using the long time format specified in your computer's regional settings.

vbShortTime

4

Display a time using the short time format specified in your computer's regional settings.


Table A-5. Tri-state constants

Constant

Value

Description

vbUseDefault

-2

Use default from your computer's regional settings

VbTrue

-1

True

VbFalse

0

False


Table A-6. Color constants

Constant

Value

Description

vbBlack

&h00

Black

vbRed

&hFF

Red

vbGreen

&hFF00

Green

vbYellow

&hFFFF

Yellow

vbBlue

&hFF0000

Blue

vbMagenta

&hFF00FF

Magenta

vbCyan

&hFFFF00

Cyan

vbWhite

&hFFFFFF

White



Previous Page
Next Page