LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Macro to delete charts

This will remove chart sheets and embedded charts:

'====================================
Sub ChartsDelete()
Dim ch As Chart
Dim ws As Worksheet
Dim chObj As ChartObject
Application.DisplayAlerts = False

For Each ch In ActiveWorkbook.Charts
ch.Delete
Next

For Each ws In ActiveWorkbook.Worksheets
For Each chObj In ws.ChartObjects
chObj.Delete
Next
Next

Application.DisplayAlerts = True
End Sub
'==================================

bambam77 wrote:
Is it possible to create a macro that can select and delete all of the
charts in a workbook. Regardless of their names?


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
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
Delete a sheet and access charts Jim--Kent Excel Worksheet Functions 2 April 6th 07 05:41 PM
Delete ALL Charts in a WorkSheet (VB) Corey Charts and Charting in Excel 2 October 4th 06 08:41 AM
How can I delete a macro when the Delete button is not active? FCR Excel Worksheet Functions 0 March 9th 06 09:43 AM
How do i delete a macro in Excel 2003 when delete isn't highlight Abel Excel Discussion (Misc queries) 2 September 13th 05 04:09 AM


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