I have a macro that saves a file using the following code. If a file already exists with the same name, Windows asks if I want to replace the original file. Selecting Yes, overwrites the file and program ends normally. Selecting No makes the program go into debug mode.
On Error Resume Next
On Error GoTo 0
ActiveWorkbook.SaveAs sNewPath & "\" & sNewFile & ".xlsx"
1. How do I prevent the debug mode when selecting No on overwriting
2. Can I make the default action to just save the new file as a copy?
ie; "Copy of SameNameFile"
3. Can I make it an option to either overwrite or save as a copy?