View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default Excluding sheet from group of selected sheets

Hi Jack,

The macro deletes the selected sheets, which may be a group of selected
sheets. The only restriction that I wish to impose is that the worksheet
"HELP" must NOT be deleted if it is included in the group of selected sheets
(and it may not be included).


Like this maybe:

Dim oSh as Object
Application.DisplayAlerts=False
For Each oSh in Activewindow.SelectedSheets
If oSh.Name<"HELP" Then
oSh.Delete
End If
Next
Application.DisplayAlerts=True

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com