How to quickly save a workbook to multiple locations in Excel?
In Excel, we can save a workbook to a specific location as we want, however, have you imaged to save one workbook to multiple folders at the same time? In this article, with the VBA code, you can quickly save one workbook to multiple locations at once.
To save a workbook to multiple locations, you just need to apply one macro code.
1. Press Alt + F11 keys to open Microsoft Visual Basic for Applications window.
2. Click Insert > Module and paste below code to the Module script. See screenshot:
VBA: Save a workbook to multiple locations
Sub SaveToLocations() 'UpdateByExtendoffice20160623 ActiveWorkbook.SaveCopyAs "C:\Users\DT168\Documents\" + ActiveWorkbook.Name ActiveWorkbook.SaveCopyAs "C:\Users\DT168\" + ActiveWorkbook.Name ActiveWorkbook.Save End Sub
Tip: in the macro code, you can change the saving paths as you want.
3. Press F5 key to run the code, and the active workbook has been saved to the locations you specified in the code.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 2 years agohow to make this code run when close/save the file automatically? thanks in advance!
- To post as a guest, your comment is unpublished.· 3 years agoIs it possible to save a file to multiple locations EVERY time someone amends it? At my office we share docs and 6 people can edit the same doc. I want to be able to create a backup of the file to a diff folder every time someone makes a change and saves it. It has to be a diff folder because the file is too big to put a backup in the same location. Can someone help please? Thanks
- To post as a guest, your comment is unpublished.· 3 years agoSorry, I did not find a good solustion about this problem