I have a macro which deletes an existing worksheet (excel yes/no prompt appears) then creates a new worksheet with the same name as the one just deleted.
If the macro is run but the user cancels the deletion of the existing worksheet, I get an error stating that excel can't name the new sheet the same as the existing one.
I want to add an 'IF' statement to exit the macro if this happens, but I am unsure of the code that determines what was selected from the prompt (delete or cancel).
This is my code:
Many Thanks
Paul
Bookmarks