IT. Expert System.

VBS

Constants


Constants

VBScript defines a number of useful constants that can be used in code. These constants provide a convenient way to use specific values without actually having to remember the value itself. To use these constants, simply place them in code instead of the values they represent.

The following tables lists the built-in VBScript constants:

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

Comparison Constants

Constant

Value

Description

vbBinaryCompare 0 Perform a binary comparison
vbTextCompare 1 Perform a textual comparison

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
vbUseSystem
DayOfWeek
0 Use the day of the week specified in your system settings for the first day of the week
vbFirstJan1 1 (default) Use the week in which January 1 occurs
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

Date Format 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

Miscellaneous Constants

Constant

Value

Description

vbObjectError -2147221504 User-defined error numbers should be greater than this value

MsgBox Constants

Constant

Value

Description

vbOKOnly 0 Display OK button only
vbOKCancel 1 Display OK and Cancel buttons
vbAbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons
vbYesNoCancel 3 Display Yes, No, and Cancel buttons
vbYesNo 4 Display Yes and No buttons
vbRetryCancel 5 Display Retry and Cancel buttons
vbCritical 16 Display Critical Message icon
vbQuestion 32 Display Warning Query icon
vbExclamation 48 Display Warning Message icon
vbInformation 64 Display Information Message icon
vbDefaultButton1 0 First button is the default
vbDefaultButton2 256 Second button is the default
vbDefaultButton3 512 Third button is the default
vbDefaultButton4 768 Fourth button is the default
vbApplicationModal 0 Application modal. The user must respond to the message box before continuing work in the current application
vbSystemModal 4096 System modal. On Win16 systems, all applications are suspended until the user responds to the message box. On Win32 systems, this constant provides an application modal message box that always remains on top of any other programs you may have running.

The following constants are used with the MsgBox function to identify which button a user has selected. These constants are only available when your project has an explicit reference to the appropriate type library containing these constant definitions. For VBScript, you must explicitly declare these constants in your code.

Constant

Value

Description

vbOK

1 OK button was clicked
vbCancel 2 Cancel button was clicked
vbAbort 3 Abort button was clicked
vbRetry 4 Retry button was clicked
vbIgnore 5 Ignore button was clicked
vbYes 6 Yes button was clicked
vbNo 7 No button was clicked

String Constants

Constant

Value

Description

vbCr Chr(13) Carriage return
VbCrLf Chr(13) & Chr(10) Carriage return–linefeed combination
vbFormFeed Chr(12) Form feed; not useful in Microsoft Windows
vbLf Chr(10) Line feed
vbNewLine Chr(13) & 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

Tristate Constants

Constant

Value

Description

vbUseDefault -2 Use default from computer's regional settings
vbTrue -1 True
vbFalse 0 False

VarType Constants

Constant

Value

Description

vbEmpty    0 Uninitialized (default)
vbNull    1 Contains no valid data
vbInteger    2 Integer subtype
vbLong    3 Long subtype
vbSingle    4 Single subtype
vbDouble    5 Double subtype
vbCurrency    6 Currency subtype
vbDate    7 Date subtype
vbString    8 String subtype
vbObject    9 Object
vbError 10 Error subtype
vbBoolean 11 Boolean subtype
vbVariant 12 Variant (used only for arrays of variants)
vbDataObject 13 Data access object
vbDecimal 14 Decimal subtype
vbByte 17 Byte subtype
vbArray 8192 Array


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 270 / 158859318. Delta: 0.00291 с