Bass71
MIS
- Jun 21, 2001
- 79
I am writing a Macro that seeks to delete sheets that do not meet certain name criteria. However, when the Macro runs, a warning box appears with each sheet to be deleted. Is there any code I can input that will bypass this warning and make one systematic delete?
Here's the code:
While ActiveSheet.Name <> "Sort"
If ActiveSheet.Name <> "SortRef" And ActiveSheet.Name <> "Sort" Then
ActiveWindow.SelectedSheets.Delete
Else: ActiveSheet.Next.Select
End If
Wend
Thanks for your help..........................
Here's the code:
While ActiveSheet.Name <> "Sort"
If ActiveSheet.Name <> "SortRef" And ActiveSheet.Name <> "Sort" Then
ActiveWindow.SelectedSheets.Delete
Else: ActiveSheet.Next.Select
End If
Wend
Thanks for your help..........................