Save as new file without changing existing file

G

Guest

Lets say an excel file “A.xls†has been opened and has had some changes made
to it but not saved. Is it possible in VBA to save this file as “B.xlsâ€
including the changes and have file “A.xls†still open in excel so that if
the file were to be closed you could still select to save the changes or not?

Thanks

Clayton
 
R

Ron de Bruin

You can use SaveCopyAs with code to save the file in the folder you want and with the name you want

ThisWorkbook.SaveCopyAs "C:\Data\yourfilename.xls"
 
G

Guest

Unfortuantly what I want is not that simple.

I basically want a macro that works just like an auto save works. So if I
run the macro a file "B.xls" is saved which is a snap shot of what the file
"A.xls" currently is. Then if I close file "A.xls" I am still asked if I
would like to save my changes before closing.
 
G

Guest

The easy way to get back the old file is simply go to the File menu and look
for the old filename at the bottom of the menu.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top