Class Shapes (Excel VBA)

A collection of all the Shape objects on the specified sheet.

The classes Chart and Worksheet. give access to class Shapes


Dim shps as Shapes
Set shps = ActiveChart.Shapes

Methods

Add3DModel - Creates a 3D model from an existing file. Returns a Shape object that represents the new 3D model.

AddCallout - Creates a borderless line callout. Returns a Shape object that represents the new callout.

AddChart2 - Adds a chart to the document. Returns a Shape object that represents a chart and adds it to the specified collection.

AddConnector - Creates a connector. Returns a Shape object that represents the new connector. When a connector is added, it's not connected to anything. Use the BeginConnect and EndConnect methods to attach the beginning and end of a connector to other shapes in the document.

AddCurve - Returns a Shape object that represents a Bézier curve on a worksheet.

AddFormControl - Creates a Microsoft Excel control. Returns a Shape object that represents the new control.

AddLabel - Creates a label. Returns a Shape object that represents the new label.

AddLine - As it applies to the Shapes object, returns a Shape object that represents the new line on a worksheet.

AddOLEObject - Creates an OLE object. Returns a Shape object that represents the new OLE object.

AddPicture - Creates a picture from an existing file. Returns a Shape object that represents the new picture.

AddPicture2 - Creates a picture from an existing file. Returns a Shape object that represents the new picture.

AddPolyline - Creates an open polyline or a closed polygon drawing. Returns a Shape object that represents the new polyline or polygon.

AddShape - Returns a Shape object that represents the new AutoShape on a worksheet.

AddSmartArt - Creates a new SmartArt graphic with the specified layout.

AddTextbox - Creates a text box. Returns a Shape object that represents the new text box.

AddTextEffect - Creates a WordArt object. Returns a Shape object that represents the new WordArt object.

BuildFreeform - Builds a freeform object. Returns a FreeformBuilder object that represents the freeform as it is being built.

Item - Returns a single object from a collection.

SelectAll - Selects all the shapes in the specified Shapes collection.

Properties

Count returns a Long value that represents the number of objects in the collection.

Range returns a ShapeRange object that represents a subset of the shapes in a Shapes collection.