Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Saving in Two Locations.
by Allen Wyatt
(last updated February 4, 2012)
Sam asked if there was a way to save the same workbook to two separate locations. For instance, one copy could be saved to the normal network location, and the other to a folder on the local hard drive.
There are any number of ways that this can be done. For instance, you could create your own macro that saves two versions of the same workbook. The macro could be assigned to a toolbar button, and then the button clicked when you want to save both copies. (In other words, you would bypass the normal Save function all together.)
Another approach is to make a small adjustment to how Excel saves the workbook. For instance, the following macro would be added to the ThisWorkbook object for the workbook:
Private Sub Workbook_BeforeSave(ByVal _ SaveAsUI As Boolean, Cancel As Boolean) With ThisWorkbook .SaveCopyAs ("c:\Backups\Backup of " & .Name) End With End Sub
This is an event handler, and it is triggered every time you go to do a save on the workbook. At that point, the macro is executed and a copy of the workbook is saved in the specified path on your local hard drive.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3042) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Saving in Two Locations.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
Does your macro need to add information to the end of a text file? This is called appending, and is done using the technique ...Discover More
Wouldn't it be great if you could look at the files in the MRU list and see the full path and file names? Excel condenses the ...Discover More
Want to easily control which records get imported from a text file into Excel? It's easy to do when you write the macro that ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."