Class OLEObjects (Excel VBA)
A collection of all the OLEObject objects on the specified worksheet.
The classes Chart and Worksheet. give access to class OLEObjects
Dim oles as OLEObjects
Set oles = ActiveChart.OLEObjects()
For Each
Here is an example of processing the OLEObjects items in a collection.
Dim oleob As OLEObject
For Each oleob In ActiveChart.OLEObjects()
Next oleob
Methods
Add - Adds a new OLE object to a sheet.
BringToFront - Brings the object to the front of the z-order.
Copy - Copies the object to the Clipboard.
CopyPicture - Copies the selected object to the Clipboard as a picture.
Cut - Cuts the object to the Clipboard.
Delete - Deletes the object.
Duplicate - Duplicates the oleobject and returns a reference to the new copy.
Item - Returns a single object from a collection.
Select - Selects the object.
SendToBack - Sends the object to the back of the z-order.
Properties
AutoLoad true if the OLE object is automatically loaded when the workbook that contains it is opened.
Border returns a Border object that represents the border of the object.
Count returns a Long value that represents the number of objects in the collection.
Enabled true if the object is enabled.
Height returns or sets a Double value that represents the height, in points, of the object.
Interior returns an Interior object that represents the interior of the specified object.
Left returns or sets a Double value that represents 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 returns or sets a Boolean value that indicates if the object is locked.
Placement returns or sets a Variant value containing an XlPlacement constant that represents the way the xlplacement is attached to the cells below it.
PrintObject true if the object will be printed when the document is printed.
Shadow returns or sets a Boolean value that determines if the object has a shadow.
ShapeRange returns a ShapeRange object that represents the specified object or objects.
SourceName returns or sets a String value that represents the specified object's link source name.
Top returns or sets a Double value that represents 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 returns or sets a Boolean value that determines whether the object is visible.
Width returns or sets a Double value that represents the width, in points, of the object.
ZOrder returns the z-order position of the object.