Class Property

Applies To

Bound Object Frame Control, Chart Control, Unbound Object Frame Control.

Description

You can use the Class property to specify or determine the class name of an embedded OLE object.

Setting

The Class property setting is a string expression that you or Microsoft Access supplies when you create or paste an OLE object.

You can set the Class property using the property sheet, a macro, or Visual Basic.

Remarks

A class name defines the type of OLE object. For example, Microsoft Excel version 5.0 supports several types of OLE objects, including worksheets and charts. Their class names are “Excel.Sheet” and “Excel.Chart” respectively. When you create an OLE object in Design view using the Paste Special command on the Edit menu or the Object command on the Insert menu, Microsoft Access enters the class name of the new object in the property sheet.

Note To determine the class name of an OLE object, see the documentation for the application supplying the object.

The Class property setting is updated when you copy an object from the Clipboard. For example, if you paste a Microsoft Excel chart from the Clipboard into an OLE object that previously contained a Microsoft Excel worksheet, the Class property setting changes from “Excel.Sheet” to “Excel.Chart”. You can paste an object from the Clipboard using Visual Basic by setting the control’s Action property to acOLEPaste or acOLEPasteSpecialDlg.

See Also

Action Property, OLEClass Property.

Example

See the Action property example.