You code seems to be OK. You do not mention if sheets are deleted.
You are probably trying to delete the one remaining sheet, which is not possible. A workbook must contain at least one sheet.
-----------------------
Regards BrianB
Most problems occur from starting at the wrong place.
Use a cup of coffee to make Windows run faster.
It is easy until you know how.
|