April 2006
Beginner
1114 pages
98h 16m
English
shapes.Range(Index)
Returns a ShapeRange object containing a subset of shapes from the Shapes collection.
|
Argument |
Settings |
|---|---|
|
|
An array containing the names or indexes of the shapes to include in the |
Use ShapeRange objects to perform tasks on a group of shapes. Building a ShapeRange from an array of items is complex. It is easier to simply select the items you want in the ShapeRange, then use the Selection.ShapeRange method as shown here:
Sub BuildShapeRange( )
Dim ws As Worksheet, s As Shape, sr As ShapeRange, sList As String, arr
Set ws = ActiveSheet
' Clear selection
[a1].Select
' Find each autoshape on the worksheet and build a list.
For Each s In ws.Shapes
If s.Type = msoAutoShape Then s.Select False
Next
Set sr = Selection.ShapeRange
' Move the ShapeRange.
sr.IncrementLeft 10
End SubRead now
Unlock full access