Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Saving in Two Locations.
Written by Allen Wyatt (last updated January 22, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
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 placed on the Quick Access Toolbar and 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.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11265) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Saving in Two Locations.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
When you import a CSV file into an Excel worksheet, you may be surprised at how the program allocates the information ...
Discover MoreMRU (most recently used) files can be a great help when you work with a given set of common workbooks. Excel allows you ...
Discover MoreWhen dealing with files containing comma-separated values, you want to make sure that what gets imported into Excel ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2022-01-22 10:20:17
J. Woolley
Also, see https://www.laptopmag.com/articles/automatic-backups-excel
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments