Hi All,
If the "Summary" sheet contains a chart, the chart must be deleted when I click the ViewSummary button. The code below does not achieve this and I can't figure it out? Please help.
Thank YouPlease Login or Register to view this content.
Hi All,
If the "Summary" sheet contains a chart, the chart must be deleted when I click the ViewSummary button. The code below does not achieve this and I can't figure it out? Please help.
Thank YouPlease Login or Register to view this content.
Last edited by Aland2929; 07-31-2009 at 02:03 PM.
Hello Aland2929,
If you have only one chart on the sheet you want to delete, you can it much more easily this way...
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Hi Leith,
Thanks for your response. I have another button on the summary sheet to create the chart. When I click the ViewSummary button it needs to check if there is a chart and if there is, it must delete the chart. If there is no chart, then it must not attempt to delete a chart because this results in an error?
This is why I tried the IF construct. Hope you can help with this.
Thank You.
Hello Aland2929,
This will check if the chart exists. If it does it will delete it.
Please Login or Register to view this content.
Thank you Leith. Your code has solved my problem. There was a "t" missing from the following line of code ".CharObjects(1).Delete", which I initially missed. I also had to activate the "Summary" sheet. Thanks for your quick response.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks