ShapeRange Methods (Excel)

GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Methods

Name

Description

Align

Aligns the shapes in the specified range of shapes.

Apply

Applies to the specified shape formatting that’s been copied by using the PickUp method.

Delete

Deletes the object.

Distribute

Horizontally or vertically distributes the shapes in the specified range of shapes.

Duplicate

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

Flip

Flips the specified shape around its horizontal or vertical axis.

Group

Groups the shapes in the specified range.

IncrementLeft

Moves the specified shape horizontally by the specified number of points.

IncrementRotation

Changes the rotation of the specified shape around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape.

IncrementTop

Moves the specified shape vertically by the specified number of points.

Item

Returns a single object from a collection.

PickUp

Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.

Regroup

Regroups the group that the specified shape range belonged to previously. Returns the regrouped shapes as a single Shape object.

RerouteConnections

This method reroutes all connectors attached to the specified shape; if the specified shape is a connector, it’s rerouted.

ScaleHeight

Scales the height of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures and OLE objects are always scaled relative to their current height.

ScaleWidth

Scales the width of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures and OLE objects are always scaled relative to their current width.

Select

Selects the object.

SetShapesDefaultProperties

Makes the formatting of the specified shape the default formatting for the shape.

Ungroup

Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes.

ZOrder

Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).