View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Error Trapping Question

I have this simple macro

Sub DeleteSheet()
Sheets("Sheet1").Select
ActiveWindow.SelectedSheets.Delete
End Sub

How should I modify it so that if Sheet1 isn't present, it'll just move on.
I'll want to add more to this at a later time, so Exit Sub may not
necessarily be an option.