Picture Object

Description

Represents a graphic (a bitmap, metafile, or image created from some other graphic file) or a linked or embedded OLE object attached to a sheet.

Accessors

The Picture object is a member of the Pictures collection. The Pictures collection includes all of the graphics on the sheet, as well as any linked or embedded OLE objects. Use the Insert method or the Picture command on the Insert menu to add a graphic file to a sheet as a graphic and add it to the collection. To access a single member of the collection, use the Pictures method with the index number or name of the graphic as an argument. While the Pictures collection contains OLEObject objects, it is easier to access the OLEObject objects using the OLEObjects collection and the OLEObjects method.

The following example deletes graphic one on worksheet one.


Worksheets(1).Pictures(1).Delete

The graphic name is shown in the Name Box when the graphic is selected. Use the Name property to set or return the graphic name. The following example duplicates the graphic named "Picture 13" and moves the new graphic so that its left edge lines up with the left edge of column H, and its top lines up with the top of row 10.


Set px = Worksheets(1).Pictures("picture 13").Duplicate
px.Left = Worksheets(1).Columns("H").Left
px.Top = Worksheets(1).Rows(10).Top

Properties

Application Property, Border Property, BottomRightCell Property, Creator Property, Enabled Property, Formula Property, Height Property, Index Property, Interior Property, Left Property, Locked Property, Name Property, OnAction Property, Parent Property, Placement Property, PrintObject Property, Shadow Property, Top Property, TopLeftCell Property, Visible Property, Width Property, ZOrder Property.

Methods

BringToFront Method, Copy Method, CopyPicture Method, Cut Method, Delete Method, Duplicate Method, Select Method, SendToBack Method.