Merge VBA Code in Excel
Compare VBA code is just a part of the VBA diff process. Usually, you need to see the differences and merge the changes in VBA code after you've found them.
In case of you are going to do it yourself, be ready to export and import all the modules in your Excel files and spend a half of your working day, if you have really large workbook.
xlCompare gives you several options you can use to merge VBA code.
Merge specific lines in VBA code
- Select line you need to merge in the VBA Editor
- Click the check box before this line
You see that this line appears in the corresponding module.
That's all. If you save the Excel file right now - new VBA code will be saved.
Merge all lines in the VBA code module
- Click in the master module, that contains code to be copied and press Ctrl+A. This hotkey selects all lines in the editor.
- Click on the any of the checkboxes in this panel.
- All the code was copied into the other VBA project.
Save your Excel file to complete the operation.
Looks very simple and easy right?