Have a question on Excel VBA save as functionality. The following basically grabs the filename entered by the user from a cell in the workbook and saves the workbook as a non-macro enabled workbook (xlsx).
It works, but was wondering what is the best way modify to account for the issues below:
1. I do not want the user to be able to overwrite existing files. So if the file exists I would like the to be prompted to change the file name.
2. The Save As xlsx will drop all the active macros. But it does not do this till the user closes the file. The problem is I have a "Workbook_BeforeClose" sub within the original workbook. This is only supposed to run on the original document. But it is running when the new file is closed. Is there a way to clear the active macros after the save as?
Bookmarks