Data Type: String
A string expression containing zero or more statements for execution.
Executes zero or more statements in the global namespace of a script.
statement must evaluate to a
string containing one or more executable statements. An
executable statement is any call to a user-defined procedure or
function, or to an intrinsic VBScript command.
multiple statements or lines of code, you can separate them with
You can also separate statements or lines of code with
embedded line breaks (i.e.,
statement includes an equal
sign, it is interpreted as an assignment rather than an
evaluation. For example,
3 assigns the value 3 to the variable x, rather than
comparing the value of the variable x with 3.
Code created by
ExecuteGlobal is executed in the
script’s global namespace. The global
namespace is the following:
In ASP and IE, code within a
</SCRIPT> tag, but outside
of individual functions or procedures.
In Outlook, form-level code outside of individual event handlers, functions, or procedures.
In WSH, code outside of individual functions and procedures.
The example WSH script illustrates the difference between
ExecuteGlobal. Each is called within the
MainProc procedure to define a
Execute creates a
it is only visible if called from MainProc.
ExecuteGlobal creates ...