OLEClass Property

Microsoft Access Visual Basic

OLEClass Property

       

You can use the OLEClass property to obtain a description of the kind of OLE object contained in a chart control or an unbound object frame. Read/write String.

expression.OLEClass

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

This property is set automatically in the control's property sheet to a string expression when you click Object on the Insert menu to add an OLE object to a form. The OLEClass property setting is read-only in all views.

Note   If you are using Automation (formerly called OLE Automation) and need to specify a name to refer to the OLE object, use the Class property.

The OLEClass property and the Class property are similar but not identical. The OLEClass property setting is a general description of the OLE object whereas the Class property setting is the name used to refer to the OLE object in Visual Basic. Examples of OLEClass property settings are Microsoft Excel Chart, Microsoft Word Document, and Paintbrush Picture.

Example

The following example displays a message indicating the OLE class for the "Customer Picture" unbound object frame on the "Order Entry" form.

MsgBox "The OLE class = " & Forms("Order Entry").Controls("Customer Picture").OLEClass