View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Deleting multiple Chart Tabs/sheets

Your code does a FINE job Shawn, exactly what I wanted.......(and in a hurry
too),,,<g

Many many thanks.......
Vaya con Dios,
Chuck, CABGx3



"Shawn O'Donnell" wrote:

"CLR" wrote:
I would like a macro to delete all Chart Tab/sheets, regardless of
their "Chart 22" or "Chart 12" numbers which Excel assigns them


Stand-alone chart sheets are kept in a collection called "Charts" that
belongs to Workbook objects like ActiveWorkbook. You can step through the
collection and delete each sheet, if that's what you really want to do...

Here's a no-going-back macro. If you want to at least think about each
sheet for a second, you can comment out the DisableAlert lines.

Sub deleteAllChartSheets()
Dim doomedChart As Variant
Application.DisplayAlerts = False
For Each doomedChart In ActiveWorkbook.Charts
doomedChart.Delete
Next doomedChart
Application.DisplayAlerts = True
End Sub