If named sheet exists then delete it
I am creating a new sheet in a macro and then renaming it to Test with
the following lines:
Sheets.Add
ActiveSheet.Name = "Test"
However, there might already be a sheet called Test in the workbook
from an earlier (failed) run of the macro. How can I detect if that
sheet exists and delete it if it does exist before the above lines of
code?
Many thanks,
Pete
|