Selecting Autoshapes

P

Pete

I have a bit of a dilemma, I hope someone in here can help me with.

I have created a spreadsheet that selects and pastes a specific Autoshape to
a specific location based on a formula. Once the Autoshapes are inserted I
want to be able to select them all to group them and move them as needed.

The problem is The autoshapes can be named anything based on the Macro and
formula. How can I select all the shapes in a given area no mater what they
are called?

This is what I have now...

ActiveSheet.Shapes.Range(Array("GroupA", "Three", "Apple", "Three_A")).Select
Selection.ShapeRange.Group.Select

The problem come in when selecting this because "Three, Apple and Three_A".
These names can be anything... "Two, Seven, Orange, Black_A and so on.

The only constant is "GroupA". and GroupA can be in Range(D14:G16), From
there, there will be a GroupB with the same problem and circumstances listed
above. GroupB is located in Range(I14:L16).

Perplexing, I know....
Can anyone help?
 
E

excelent

Or if u only ned some of the shapes
this return all shape names

Sub ShapeNames()

For Each ch In ActiveSheet.Shapes
x = x & vbLf & ch.Name
Next

MsgBox ("Shape Names") & vbLf & x

End Sub



"Pete" skrev:
 
P

Pete

Thank you for this, but I do not need to select every Autoshape in the active
worksheet, just a few depending on the application. Again these few autoshape
can be named anything...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top