VBScript constant
A constant is a name with a certain meaning. It is used to replace a number or string, and its value never changes. VBScript defines many internal constants. For more information, see the VBScript language reference.
Create constant
You can use the Const statement to create user-defined constants in VBScript. UseConstStatements can create string or numeric constants with specific meanings and assign them original values. For example:
Const MyString ="
This is a string."
Const MyAge = 49
Note that the string text is contained between two quotation marks. This is the most obvious way to distinguish between string constants and numeric constants. The date text and the time text are included in the interval between two periods. For example:
Const CutoffDate = #6-1-97 #
It is best to use a naming scheme to distinguish between constants and variables. This avoids re-assigning values to constants when running scripts. For example, you can use "vb" or "con" as the prefix of the constant name, or capital all the letters of the constant name. Separating constants and variables can avoid confusion when developing complex scripts.