Data Type: Any
The name of the variable, which must follow VBScript naming conventions (see the second bullet in “Rules at a Glance”).
Data Type: Integer or Long
varname as an array
and optionally specifies the dimensions and number of elements
of the array.
Used in a script or a
block to declare a public variable and allocate the relevant storage
space in memory. A
variable has global scope—that is, it can be used by all procedures
in a script. When used in a class construct, it is visible outside
the class project.
The behavior of a
Public variable depends on where it’s
declared, as the following table shows:
Variable declared in...
Any procedure, Function or Property statement
Illegal; generates a syntax error; use the
Variable is available throughout the script.
Class block declarations section
Variable is available as a property of the class to all code within the script.
You can override standard variable naming conventions by placing your variable name in brackets. This allows you to use reserved words or illegal characters in variable names. For example:
Public [me] Public [1Var] Public [2-Var]
varname follows standard VB naming conventions. It must begin with an alphabetic character, can’t contain embedded periods or spaces, can’t be the same as a VBScript reserved word, ...