Aug 1 2008 10:00PM GMT
Posted by: Jerry Lees
Objects, set, set command, VBScript, VBScript Objects, VBScript Statements, working with objects, working with variables
VBScript Statements: Explanation of the Set Statement
Posted by: Jerry Lees
The set statement is used to assign any value to any type of variable. For the most part this command is optional. However, it needs to be used when you are assigning an object reference to a variable, such as when you use a variable to hold the return of a CreateObject function for later reference in your code.
An example of the set command would look like:
Option explicit
Dim objDictionary
Set objDictionary = CreateObject(”Scripting.Dictionary”)




