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.
Export Range to File
|Kutools for Excel's Export Range to File function can export or save a range to separate file as
workbook, pdf, text, csv or text.
|Click Enterprise > Import/Export > Export Range to File.|
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
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.
Recommended Productivity Tools
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.· 1 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.· 1 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