Activating embedded chart using VB

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a variable number of charts on approximately 20 worksheets. If I
have a counter j imcrementing through the charts, how do I activate the
charts on each worksheet. I've tried

charts(j).Activate

I get a "subscript out of range" error. In the case of this one worksheet,
I know there is one chart present . I've already activated the worksheet.

Thanks,
Barb Reinhardt
 
Actually the "Charts" collection available from the workbook gets you access
to worksheet charts. To get access to embeddded charts in worksheets, you
need to use the "ChartObjects" collection. And btw, ChartObjects.Count, when
executed in a worksheet scope, returns how many embedded charts there is.
 
Back
Top