This seems simple but I'm struggling to get anything useful out of the help and it's driving me nuts.
All I need to do is select, in code, a user-specified subset of shapes on a sheet.
Specifically he selects an area of the sheet, then the code notes all the shapes which lie in that area and selects them.
I can create a list of the shapes which meet the criteria. I can even select each one of them in turn, but how do I select ALL of them? If I knew beforehand what they were I could use the:
Shapes.Range(Array(name1, name2, name3, name4)).Select
method.
But I've tried that - I created an array of shape names called selectedshapes() and used:
ActiveSheet.Shapes.Range(selectedshapes()).Select
This did not work.
Then I tried creating a shaperange object and using the .add method to add each shape in turn before finally selecting the shaperange. But that did not work either.
I'm sure this must be simple, but I guess I'm just being dumb today.
As usual, any help would be much appreciated.
Tony
All I need to do is select, in code, a user-specified subset of shapes on a sheet.
Specifically he selects an area of the sheet, then the code notes all the shapes which lie in that area and selects them.
I can create a list of the shapes which meet the criteria. I can even select each one of them in turn, but how do I select ALL of them? If I knew beforehand what they were I could use the:
Shapes.Range(Array(name1, name2, name3, name4)).Select
method.
But I've tried that - I created an array of shape names called selectedshapes() and used:
ActiveSheet.Shapes.Range(selectedshapes()).Select
This did not work.
Then I tried creating a shaperange object and using the .add method to add each shape in turn before finally selecting the shaperange. But that did not work either.
I'm sure this must be simple, but I guess I'm just being dumb today.
As usual, any help would be much appreciated.
Tony