CreateObject (function)

<< Click to Display Table of Contents >>

CreateObject (function)

CreateObject(Class)

Creates an OLE Automation object and returns a reference to this object.

The function expects the following syntax for the Class parameter:

Application.Class

Application is the application name and Class is the object type. Class is the name under which the object is listed the Windows Registry.

Example:

Set tm = CreateObject("TextMaker.Application")

When you invoke this function and the respective application is not already running, it will launch automatically.

As soon as the object has been created, its methods and properties can be accessed using dot notation – for example:

tm.Visible = True     ' makes TextMaker's application window visible

See also: GetObject, Set, section OLE Automation