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.|
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
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.· 2 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.· 2 years agoSorry, I did not find a good solustion about this problem