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

Thanks Jon..........it looks so simple when you do it <g

Vaya con Dios,
Chuck, CABGx3


"Jon Peltier" wrote in message
...
If you're in a real hurry, this is quicker to type:

Application.DisplayAlerts = False
ActiveWorkbook.Charts.Delete
Application.DisplayAlerts = True

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


CLR wrote:

I tried to thank you earlier Shawn, but the system refused my

reply.......

Your code works FINE, 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