Activating embedded chart using VB

B

Barb Reinhardt

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
 
S

Stephane Rodriguez

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top