View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Debra Dalgleish Debra Dalgleish is offline
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