The VBScript Network and Systems Administrator's Cafe:

DIM

May 24 2008   3:47PM GMT

VBScript Statements: Explanation of the Dim Statement



Posted by: Jerry Lees
VBScript, VBScript Statements, vbscriptstatements, DIM Statement, DIM

The DIM statement is used to declare variables prior to being used. To save space in your code, you can declare more than one variable in a single statement by separating each variable with a comma.

For example:

Dim x
Dim x, y, z

The Dim statement is not required in VBScript because VBScript will automatically create variables at the time you first use them.