CreateObject

This function creates a reference to an Automation object.

Syntax

CreateObject(object)

Parameters

object
A string containing the ProgID of the object to create.

Return Values

Returns a reference to an Automation object.

Remarks

Use CreateObject to create non-visible ActiveX controls at run time. You cannot use CreateObject to create graphical objects such as a TreeView control or a ListView control. CreateObject produces objects that cannot respond to events. To produce objects that can respond to events, use the CreateObjectWithEvents function. The following table lists the ProgIDs for the ActiveX controls without events.

Control
ProgID
Microsoft CE File control 6.0 Filectl.file
Microsoft CE FileSystem control 6.0 Filectl.filesystem
Microsoft CE ImageList control 6.0 CEimageList.imagelistctrl