Selecting chartobject without index no.

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

Guest

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
 
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
 
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.
 
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.
 
Back
Top