OLEObjects OLEObjects OLEObjects Interface

Definition

A collection of all the OLEObject objects on the specified worksheet. Each OLEObject object represents an ActiveX control or a linked or embedded OLE object.

public interface class OLEObjects : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("000208A3-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface OLEObjects : System.Collections.IEnumerable
Public Interface OLEObjects
Implements IEnumerable
Attributes
Implements

Remarks

Use the OLEObjects(Object) method to return the OLEObjects collection.

Use the Add(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) method to create a new OLE object and add it to the OLEObjects collection.

An ActiveX control on a sheet has two names: the name of the shape that contains the control, which you can see in the Name box when you view the sheet, and the code name for the control, which you can see in the cell to the right of (Name) in the Properties window. When you first add a control to a sheet, the shape name and code name match. However, if you change either the shape name or code name, the other is not automatically changed to match.

You use the code name of a control in the names of its event procedures. However, when you return a control from the Shapes or OLEObjects collection for a sheet, you must use the shape name, not the code name, to refer to the control by name. For example, assume that you add a check box to a sheet and that both the default shape name and the default code name are CheckBox1. If you then change the control code name by typing chkFinished next to (Name) in the Properties window, you must use chkFinished in event procedures names, but you still have to use CheckBox1 to return the control from the Shapes or OLEObjects collection.

Properties

Application Application Application

Returns an Application object that represents the Microsoft Excel application.

AutoLoad AutoLoad AutoLoad

True if the OLE object is automatically loaded when the workbook that contains it is opened.

Border Border Border

Returns a Border object that represents the border of the object.

Count Count Count

Returns the number of objects in the collection.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which this object was created.

Enabled Enabled Enabled

True if the object is enabled.

Height Height Height

The height, in points, of the object.

Interior Interior Interior

Returns an Interior object that represents the interior of the specified object.

Left Left Left

The distance, in points, from the left edge of the object to the left edge of column A (on a worksheet) or the left edge of the chart area (on a chart).

Locked Locked Locked

True if the object is locked; False if the object can be modified when the sheet is protected.

OnAction OnAction OnAction

Reserved for internal use.

Parent Parent Parent

Returns the parent object for the specified object.

Placement Placement Placement

Returns or sets the way the object is attached to the cells below it.

PrintObject PrintObject PrintObject

True if the object will be printed when the document is printed.

Shadow Shadow Shadow

True if the font is a shadow font or if the object has a shadow.

ShapeRange ShapeRange ShapeRange

Returns a ShapeRange object that represents the specified object or objects.

SourceName SourceName SourceName

Returns or sets the specified object's link source name.

Top Top Top

The distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart).

Visible Visible Visible

Determines whether the object is visible.

Width Width Width

The width, in points, of the object.

ZOrder ZOrder ZOrder

Returns the z-order position of the object.

Methods

_Dummy12() _Dummy12() _Dummy12()

Reserved for internal use.

_Dummy15() _Dummy15() _Dummy15()

Reserved for internal use.

_Dummy22() _Dummy22() _Dummy22()

Reserved for internal use.

_Dummy3() _Dummy3() _Dummy3()

Reserved for internal use.

_Dummy30() _Dummy30() _Dummy30()

Reserved for internal use.

_Dummy32() _Dummy32() _Dummy32()

Reserved for internal use.

_Dummy33() _Dummy33() _Dummy33()

Reserved for internal use.

_Dummy34() _Dummy34() _Dummy34()

Reserved for internal use.

_Dummy36() _Dummy36() _Dummy36()

Reserved for internal use.

_Dummy37() _Dummy37() _Dummy37()

Reserved for internal use.

_Dummy38() _Dummy38() _Dummy38()

Reserved for internal use.

_Dummy39() _Dummy39() _Dummy39()

Reserved for internal use.

_Dummy40() _Dummy40() _Dummy40()

Reserved for internal use.

_Dummy41() _Dummy41() _Dummy41()

Reserved for internal use.

Add(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) Add(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) Add(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Adds a new OLE object to a sheet. Returns an OLEObject object.

BringToFront() BringToFront() BringToFront()

Brings the object to the front of the z-order.

Copy() Copy() Copy()

Copies the object to the Clipboard.

CopyPicture(XlPictureAppearance, XlCopyPictureFormat) CopyPicture(XlPictureAppearance, XlCopyPictureFormat) CopyPicture(XlPictureAppearance, XlCopyPictureFormat)

Copies the selected object to the Clipboard as a picture.

Cut() Cut() Cut()

Cuts the object to the Clipboard or pastes it into a specified destination.

Delete() Delete() Delete()

Deletes the object.

Duplicate() Duplicate() Duplicate()

Duplicates the object and returns a reference to the new copy.

GetEnumerator() GetEnumerator() GetEnumerator()
Group() Group() Group()

Reserved for internal use.

Item(Object) Item(Object) Item(Object)

Returns a single object from a collection.

Select(Object) Select(Object) Select(Object)

Selects the object.

SendToBack() SendToBack() SendToBack()

Sends the object to the back of the z-order.

Applies to