I have a main summery page that creates subsequent pages full of data. First, however, I need to delete all the other pages, as these will contain old data. I am using the following code:
On Error Resume Next
Err.Clear
Do
Sheets(2).Delete
Loop While Err.Number = 0
This works, but requires me to tell excel is OK to delete each page, which gets tiresome after ~20 pages.
Is there a way to disable this warning?
Else, can I select all sheets but sheet(1) and delete them in one fell swoop?
Thanks
-pj
On Error Resume Next
Err.Clear
Do
Sheets(2).Delete
Loop While Err.Number = 0
This works, but requires me to tell excel is OK to delete each page, which gets tiresome after ~20 pages.
Is there a way to disable this warning?
Else, can I select all sheets but sheet(1) and delete them in one fell swoop?
Thanks
-pj