OLEObjects Collection Properties and Methods

Name

Returns

Description

AutoLoad

Boolean

Set/Get whether the OLE object is automatically loaded when the workbook is opened. Not valid for ActiveX controls. Usually set to False. This property only works if there is one OLEObject in the collection

Border

Border

Read-only. Returns the border's properties around the OLE object. This property only works if there is one OLEObject in the collection

Enabled

Boolean

Set/Get whether the OLEObject is enabled. This property only works if there is one OLEObject in the collection

Height

Double

Set/Get the height of OLEObject frame. This property only works if there is one OLEObject in the collection

Name

Returns

Description

Interior

Interior

Read-only. Returns an object containing options to format the inside area of the OLE object (for example, interior color). This property only works if there is one OLEObject in the collection

Left

Double

Set/Get the distance from the left edge of the OLEObject frame to the left edge of the sheet. This property only works if there is one OLEObject in the collection

Locked

Boolean

Set/Get whether editing will be possible when the parent sheet is protected. This property only works if there is one OLEObject in the collection

Placement

XlPlacement

Set/Get how the OLEObject object is anchored to the sheet (for example, free floating, move with cells). Use the XlPlacement constants to set this property. This property only works if there is one OLEObject in the collection

PrintObject

Boolean

Set/Get whether the OLEObject on the sheet will be printed when the sheet is printed. This property only works if there is one OLEObject in the collection

Shadow

Boolean

Set/Get whether a shadow appears around the OLE object. This property only works if there is one OLEObject in the collection

ShapeRange

ShapeRange

Read-only. Returns the OLE object as a Shape object. This property only works if there is one OLEObject in the collection

SourceName

String

Set/Get the link source name of the OLE object. This property only works if there is one OLEObject in the collection

Top

Double

Set/Get the distance from top edge of the OLE object to the top of the parent sheet. This property only works if there is one OLEObject in the collection

Visible

Boolean

Set/Get whether all the OLEObjects in the collection are visible

Width

Double

Set/Get the width of the OLE object frame. This property only works if there is one OLEObject in the collection

ZOrder

Long

Read-only. Returns the position of the OLE object among all the other objects on the sheet. This property only works if there is one OLEObject in the collection

Add

OLEObject

Method. Parameters: [ClassType], [Filename], [Link], [DisplayAsIcon], [IconFileName], [IconIndex], [Icon-Label], [Left], [Top], [Width], [Height]. Adds an OLE object to the collection of OLEObjects. The position of the new OLE object can be specified by using the Left, Top, Width, and Height parameters. The type of OLEObject (ClassType) or its location (FileName) can be specified as well. The other parameters have equivalent OLEObject properties

Name Returns

Description

BringToFront

Variant

Method. Brings all the OLE objects in the collection to the front of all the other objects

Copy

Variant

Method. Copies all the OLE objects in the collection into the clipboard

CopyPicture

Variant

Method. Parameters: Appearance As XlPictureAppear-ance, Format As XlCopyPictureFormat. Copies the OLE objects in the collection into the clipboard as a picture. The Appearance parameter can be used to specify whether the picture is copied as it looks on the screen or when printed. The Format parameter can specify the type of picture that will be put into the clipboard

Cut

Variant

Method. Cuts all the OLE objects in the collection into the clipboard

Delete

Variant

Method. Deletes all the OLEObject objects in the collection from the clipboard

Duplicate

Object

Method. Duplicates all the OLEObject objects in the collection into the parent sheet

Select

Variant

Method. Parameters: [Replace]. Selects all the OLEObject objects in the collection

SendToBack Variant Method. Brings the OLEObject objects in the collection to the back of other objects

+3 -1

Responses

Post a comment