Selecting chartobject without index no.

J

Jaylin

I have 25 worksheets each with 2 graphs.
I need to revise the source series for all the graphs in these worksheets.

I thought I can use VB language to auto change the series reference
but I do not know the index number for each of the chart

"ActiveSheet.ChartObjects("index").Activate

Hope I could have advice on how to activate each charts without useing the
chart index
 
J

Jaylin

Dear Mr Peltier

Thank you very much for the useful advice.

I have problem activating a chart as I do not know the chart index number.
Would appreciate your additional advice.
--
Thanks a million for your time and expert advice :)
Jaylin
*****Jaylin Message ended*******


Jon Peltier said:
Well, first of all, if the index is a number, make sure you don't put it in
quotes. Second of all, you can name the charts uniquely, either in code if
the charts are generated automatically, or by hand after the fact. This page
discusses chart names:

http://peltiertech.com/Excel/ChartsHowTo/NameAChart.html

- Jon
 
J

Jon Peltier

To find out the chart object index, run this from the Immediate Widow, and
see what's activated:

ActiveSheet.ChartObjects(1).Select

Change the (1) to see what all the numbers refer to.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


Jaylin said:
Dear Mr Peltier

Thank you very much for the useful advice.

I have problem activating a chart as I do not know the chart index number.
Would appreciate your additional advice.
 
J

Jon Peltier

To find out the chart object index, run this from the Immediate Widow, and
see what's activated:

ActiveSheet.ChartObjects(1).Select

Change the (1) to see what all the numbers refer to.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


Jaylin said:
Dear Mr Peltier

Thank you very much for the useful advice.

I have problem activating a chart as I do not know the chart index number.
Would appreciate your additional advice.
 

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