Object Variables

In Scripter, object variables contain references to ActiveX objects. Creating the program Application object is an example of declaring an object variable:

 

Dim SurferApp As Object

Set SurferApp = CreateObject("Surfer.Application")

In this example, a DIM statement declares that the variable named SurferApp holds a reference to an object. The built-in CreateObject function returns a reference to a Surfer Application object, and the SET statement assigns this object reference to the SurferApp variable. Unlike variables of other types, which can be assigned new values simply with an equal sign ( = ), object variables must be assigned values with a SET statement.

Next: Array Variables

See Also

Introducing Scripter

Variables

Global Variables

User-Defined Types

Object Hierarchy

Surfer Object Model