Class Property

See Also7ZXRRQ

Applies To

OLE control2HQDVVU.

Description

Determines the class name of an embedded OLE object.

Usage

[form.]ole.Class [ = classname ]

Remarks

A class name defines the type of an OLE object.  For example, Microsoft Excel version 4.0 supports three types of OLE objectsspreadsheets, charts, and macro sheets.  Their class names are "ExcelWorksheet," "ExcelChart," and "ExcelMacrosheet," respectively.

When you create an object at design time using the Insert Object or Paste Special dialogs, the class of the new object is automatically entered in the Properties window.

To view a list of class names available on your system, select the Class property in the Properties window and click the three dots (...) in the Settings box.

This property is updated when an object is copied from the Clipboard.  For example, if a Microsoft Excel chart is pasted from the Clipboard to an OLE object that previously contained a Microsoft Excel worksheet, the Class property changes from "ExcelChart" to "ExcelWorksheet."  You can paste an object from the Clipboard by setting Action = 5 (Paste), or Action = 15 (Paste Special Dialog).

 

Note   With the advent of OLE2 and OLE Automation, the syntax for the Class property will change.  Applications that are updated to support OLE2 or OLE Automation will define their objects using the following syntax:

          "applicationname.objecttype"

Applicationname specifies the name of the application supplying the object.  Objecttype specifies the object's type (for example, worksheet, chart, macro sheet).

 

Data Type

String7WSH0XQ


See Also

Help:

Action Property04T78S3

PasteOK PropertyMF6ISM

 

Programmer's Guide:

Chapter 22, "Object Linking and Embedding (OLE)"