Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 44
Default Chart macro

Hi, i have a button command that brings a embedded chart onto my worksheet,
it works fine, so i wanted to write a simple marco to asighn to another
button to delete the chart when i had finished looking at it, this is what
Excel recorded,

ActiveSheet.ChartObjects("Chart 5029").Activate
ActiveChart.Axes(xlValue).Select
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Selection.Delete

Now this works as long as the "Chart 5029" number is the same as on the
chart its self ,ie when i left click and put it in a chart window to see what
the number is along the top of the box, so, i press the button, it works, i
call up a chart again with the other button, press the delete button and
error, because the Chart number as changed to one thats different to the one
in the macro. I don't know what the number is for and how to either stop it
from changing ( why does it change ) or to write a macro to adjust for the
change in this number.

Thanks to anyone who can answer this problem....Cheers
 
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
chart macro mohavv Excel Discussion (Misc queries) 6 June 5th 08 02:31 AM
Chart Macro zephyr Charts and Charting in Excel 1 December 5th 07 04:37 PM
Chart using Macro Abhijeet Charts and Charting in Excel 0 August 1st 05 05:00 PM
Chart Macro James Charts and Charting in Excel 2 March 4th 05 04:29 PM
Macro to Update Chart ddng Charts and Charting in Excel 1 February 18th 05 11:41 PM


All times are GMT +1. The time now is 07:02 PM.

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"