Declaring Variables

You can declare variables explicitly in your script using the Dim statement, the Public statement, and the Private statement.

For example:

Dim DegreesFahrenheit

You can declare multiple variables by separating each variable name with a comma.

For example:

Dim Top, Bottom, Left, Right

You can also declare a variable implicitly by simply using its name in your script. That is not a suggested practice because you could misspell the variable name in one or more places, causing unexpected results when your script is run. For that reason, the Option Explicit statement is available to require explicit declaration of all variables. The Option Explicit statement should be the first statement in your script.

The following example illustrates the use of the BSL Variables property:

Example:

Dim Top, Bottom, Left, Right
Top = 10
Bottom = 20
Left = 5
Right = 15