View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default delete all sheets but one


Application.Displayalerts = False

For Each sh In Activeworkbook.Worksheets
If sh.Name < activesheet.name then
sh.Delete
End If
Next sh

Application.Displayalerts = True

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"hans" wrote in message
...
Is there a way to delete all sheets but the active one?

Thanks Hans