trouble with selecting ActiveSheet.Shapes.Range
To clarify, I am selecting a subset of charts on a worksheet.
This is very old code I'm trying to get to work with excel 2007.
Originally it used a base of 0.
When that wouldn't work I tried 1.
The example in the help file specifically uses 1.
I think I'm getting bit by the .Name problems you mentioned.
I've certainly seen this problem in other forms.
Later tonight I will try the loop to get the zOrder values.
How would using Activesheet.Chartobjects compare to using .Shapes?
If you want to have some fun with .Names, try this:
Get a worksheet with a bunch of embedded charts.
Make sure they have unique .Names otherwise you'll have trouble
selecting a subset of charts.
Select some of them and run this code:
for each obj in Selection
debug.print obj.name
next
for i=1 to Selection.count
set obj = Selection(i)
debug.print obj.name
next i
What happens to me is the first loop works as expected.
The second loop starts at the front of the zOrder, I think.
Thanks,
Brian
|