Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Deleting charts on a sheet

How do I select all of the charts on a sheet to delete them? The chart names are going to change everytime, so my existing code isn't good enough

ActiveSheet.Shapes.Range(Array("Chart 82", "Chart 83")).Selec
Selection.Delet

Thanks in advnace

John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Deleting charts on a sheet

Maybe:

ActiveSheet.ChartObjects.Delete


John wrote:

How do I select all of the charts on a sheet to delete them? The chart names are going to change everytime, so my existing code isn't good enough.

ActiveSheet.Shapes.Range(Array("Chart 82", "Chart 83")).Select
Selection.Delete

Thanks in advnace.

John


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting charts on a sheet

Try this:

Dim i As Integer

For i = 1 To ActiveSheet.ChartObjects.Count
ActiveSheet.ChartObjects(i).Delete
Next

--
Message posted from http://www.ExcelForum.com

Reply
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
Charts should not be resized when deleting rows/columns. BobM Charts and Charting in Excel 1 February 11th 05 07:39 AM
Deleting every-other row in a spread sheet smintey Excel Discussion (Misc queries) 5 December 8th 04 05:08 PM
Deleting a sheet P. Dileepan[_2_] Excel Programming 3 April 12th 04 10:34 AM
Deleting Sheet Tommi[_2_] Excel Programming 3 December 18th 03 05:28 PM
Deleting a Sheet Abdul Salam Excel Programming 1 July 29th 03 12:43 AM


All times are GMT +1. The time now is 10:22 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"