Macro Intro
This Excel macro is the inverse of Copy Multiple Workbooks into One where separate Workbooks are being combined into one MASTER Workbook. The Update Multiple Workbooks from One macro instead takes the current information from the MASTER Workbook and updates separate Workbooks. If you desire one source of information that can be easily distributed across multiple parties this macro is for you! If you want to secure the MASTER Workbook further refer to our Password Encryption Tutorial to setup additional security to protect the data source.When this Excel macro runs it will loop through each Worksheet in the MASTER Workbook referencing the Workbook mapping indicated in the VBA code. By Default, the first Worksheet of the separate Workbook will be updated. You can customize this in the code to update a different Worksheet. If no Workbook mapping is present then the Active Workbook Path and Worksheet Name will be used to find a Workbook to update. If nothing is found a MsgBox will appear informing you no update will be made before moving onto the next Worksheet.
I have another Excel macro Save Worksheets as Workbooks that gives the impression that it is updating multiple workbooks from one. What this macro is doing is creating a new workbook overwriting the old one. This can be a problem if worksheets within these separate workbooks are being updated because this macro will delete this information. The Excel Update Multiple Workbooks from One macro is different because it is updating an existing Workbook not overwriting it.
See it in Action
Watch this video to see this macro in action and checkout our Macro Design presentation!Code
Here is the code for this macro. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Excel 16.0 Object LibraryCustomization
These segments of code can be customized to personalize this macro.Update the WB Mapping and WSMapping
Remove if you don’t want this macro to look for a separate Workbook in the same Folder as the Active Workbook
Remove if you don’t want to see a MsgBox if no WBMapping is found
Remove if you don’t want a MsgBox when this macro finishes