G
Guest
Two charts, one on "Options" page, one on "Data" page. Make a simple macro
that switches the two round.
Recorded a macro, and when I tried to run it I got an error.
ActiveSheet.ChartObjects("Chart 51").Activate
ActiveChart.ChartArea.Select
ActiveChart.Location Where:=xlLocationAsObject, Name:="Data"
Then Chart 24 to "Options". Also recorded the bit where they switch back.
But Chart 24 is now Chart 25, and Chart 51 is now Chart 54. The numbers seem
to go up each time something is done with a chart... As such, when I try and
run the macro again the charts have different numbers and it fails.
Can you assign a name to a chart to provent this?
that switches the two round.
Recorded a macro, and when I tried to run it I got an error.
ActiveSheet.ChartObjects("Chart 51").Activate
ActiveChart.ChartArea.Select
ActiveChart.Location Where:=xlLocationAsObject, Name:="Data"
Then Chart 24 to "Options". Also recorded the bit where they switch back.
But Chart 24 is now Chart 25, and Chart 51 is now Chart 54. The numbers seem
to go up each time something is done with a chart... As such, when I try and
run the macro again the charts have different numbers and it fails.
Can you assign a name to a chart to provent this?