I have a function that I call with the name of a shape that exists on my worksheet.
I actually select that shape on the worksheet, then execute a macro and since it is a single shape selection, it is easy to get its name:
![]()
Please Login or Register to view this content.
However, I also want to be able to select multiple shapes (via ctrl-click) on my worksheet, and still to be able to successfully use my macro.
Obviously, in the case of multiple shapes the Selection contains e.g.:
ActiveSheet.Shapes.Range(Array("Shape 1", "Shape 2", etc. etc))
What code do I use to find out:
a) Whether the Selection is that of multiple shapes (array of shapes), or just a single shape
b) If it is an array of shapes, how many there are
c) Also, how do I iterate through those names (so that I can pass each one to my function inside some kind of loop)?
Thanks,
a1
Bookmarks