View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Delete all but 1 sheet in workbook

try
Sub deleteallsheets()
Application.DisplayAlerts = False
For Each ws In Worksheets
If ws.Index < 1 Then ws.Delete
Next
Application.DisplayAlerts = True
End Sub

--
Don Guillett
SalesAid Software

"cdclayton" wrote in message
oups.com...
Thanks for your help. One more question, is it possible to have this
work no matter what the sheet is renamed to?

Thanks,

Charles D Clayton Jr