LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
PaulW
 
Posts: n/a
Default Assign charts names in VBA?

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 Whe=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?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple charts similar size? [email protected] Charts and Charting in Excel 2 March 10th 06 05:16 PM
Charts: want to assign fixed color for each slice [email protected] Charts and Charting in Excel 1 November 15th 05 07:49 PM
Separating names Danno Excel Worksheet Functions 5 October 31st 05 12:29 AM
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM
Range Names with Charts ArthurJ Charts and Charting in Excel 3 June 6th 05 06:49 PM


All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"