2
votes

I''m looking for a vba macro that will make a copy of the current Excel 2007 macro-enabled workbook with the name I specify as an Excel 2003 macro-free document. It should also keep the current workbook open and in the Excel 2007 format (so save-as wouldn't work).

I can't figure out how to do the copy operation...

1

1 Answers

3
votes

It's much, much easier to do a save as.

Why does it have to stay open? - you can simulate it by:

  • Doing a Save As to a new file
  • Close the copy
  • Re-open the original

As far as removing the code look at these questions:

Source control of Excel VBA code modules

Macro to save active Sheet as new workbook, ask user for location and remove macros from the new workbook