View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Delete Multiple Worksheets

Try this one

Sub test()
Dim sh As Worksheet
Application.DisplayAlerts = False
For Each sh In ThisWorkbook.Worksheets
If LCase(Trim(sh.Name)) < "summary" Then
sh.Delete
End If
Next sh
Application.DisplayAlerts = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"B.M.Spell" wrote in message ...
Good Morning
I have a workbook which uses a loop funtion in a macro to
collect data for a monthly history report. Sheets are created for every day
of the month, then a final summary sheet with the totals for all days. How
do I create a macro to delete all the sheets which were created for every
day of the month, but keep the summary sheet. Thanks