Promotic

Constants list of the VBScript language

Writing constants (their text notation) can be used anywhere in the script instead of current values, which allows comfortable writing the value without knowing its numeric value. Using the text notation of constants makes the script better arranged and easier modifiable. Because constants are defined in the VBScript, they needn't be declared in the script.

VBScript constants of data type values (See also Data types VBScript):

Constant Description
true The keyword of boolean value "True" (equals to -1 !!)
false The keyword of boolean value "False" (equals to 0 !!)
Empty The keyword is used to indicate an uninitialized variable value
Null The keyword is used to indicate that a variable contains no valid data
Nothing The keyword is used to indicate that a variable of the Object type doesn't point to any object


VBScript constants of data types:

Constant Value Description
vbEmpty 0 uninitialized data type
vbNull 1 contains no valid data
vbBoolean 11 Boolean data type
vbByte 17 Byte data type
vbInteger 2 Integer data type
vbLong 3 Long data type
vbSingle 4 Single data type
vbDouble 5 Double data type
vbDate 7 Date data type
vbString 8 String data type
vbObject 9 Object data type
vbVariant 12 Variant data type
vbArray 8192 Array data type


VBScript string constants (values of these constants can be created also by the Chr function):

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 Windows OS
vbLf Chr(10) Line feed
vbNewLine Chr(13) & Chr(10) or Chr(10) platform-dependent. Sometimes it is necessary to combine vbCrLf (position on new row start), sometimes it is sufficient vbLf (position on new row)
vbTab Chr(9) Horizontal tab


VBScript 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
vbFirstJan1 1 Use the week in which 1st January occurs
vbFirstFourDays 2 Use the 1st week that has at least 4 days in the new year
vbFirstFullWeek 3 Use the first full week of the year
vbUseSystem 0 Use the date format contained in the regional settings for your computer
vbUseSystemDayOfWeek 0 Use the day of the week specified in your system settings for the first day of the week
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.