Skip to Main Content
VBScript in a Nutshell, 2nd Edition
book

VBScript in a Nutshell, 2nd Edition

by Paul Lomax, Matt Childs, Ron Petrusha
March 2003
Intermediate to advanced content levelIntermediate to advanced
512 pages
14h 30m
English
O'Reilly Media, Inc.
Content preview from VBScript in a Nutshell, 2nd Edition

Appendix B. VBScript Constants

What follows is a series of tables listing the intrinsic constants supported by VBScript and their values. Note that, because the constants are part of the VBScript language, you don’t have to define them using the Const statement.

Color Constants

These constants represent the values returned by RGB for standard colors:

Constant

Value

Description

vbBlack

0

Black

vbRed

255

Red

vbGreen

65280

Green

vbYellow

65535

Yellow

vbBlue

16,711,680

Blue

vbMagenta

16,711,935

Magenta

vbCyan

16,776,960

Cyan

vbWhite

16,777,215

White

Comparison Constants

The comparison constants are used by a number of functions (Filter, StrComp, Split, and Replace), as well as by the CompareMode property of the Dictionary object, to determine whether astring comparison should be case-sensitive or not:

Constant

Value

Description

vbBinaryCompare

0

Binary (case-sensitive comparison)

vbTextCompare

1

Text (case-insensitive comparison)

vbDatabaseCompare

2

Database (unused in VBScript)

Date and Time Constants

A number of functions (DateDiff, DatePart, Weekday, and WeekdayName) have a FirstDayOfWeek parameter whose value can be one of the day of the week constants (vbSunday through vbSaturday) as well as vbUseSystemDayOfWeek.

The DateDiff and DatePart functions also have a FirstWeekOfYear parameter whose value can be vbUseSystem, vbFirstJan1, vbFirstFourDays, or vbFirstFullWeek.

Constant

Value

Description

vbSunday

1

Sunday

vbMonday

2

Monday

vbTuesday

3

Tuesday

vbWednesday

4

Wednesday

vbThursday

5

Thursday

vbFriday ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

VBScript in a Nutshell

VBScript in a Nutshell

Matt Childs, Paul Lomax, Ron Petrusha
Microsoft® PowerShell, VBScript and JScript® Bible

Microsoft® PowerShell, VBScript and JScript® Bible

William R. Stanek, James O'Neill, Jeffrey Rosen

Publisher Resources

ISBN: 0596004885Errata Page