View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brian Murphy Brian Murphy is offline
external usenet poster
 
Posts: 126
Default trouble with selecting ActiveSheet.Shapes.Range

I'm going nuts (again).

At the end of a routine I'm trying to select a group of embedded
charts.
According to the online help in excel 2007, the following ought to
work:

ReDim chtnames(1 to 2)
set the two chtnames
ActiveSheet.Shapes.Range(chtnames).Select

In fact, the above did work for me when I first put it in. But now...
The above generates an "the index into the specified collection is out
of bounds" run time error.

However, the following will work in the immediate window where the
above fails.
activesheet.shapes.range(array(chtnames(1),chtname s(2))).select

What am I missing?

Thanks,

Brian