Compare VBA Code and Forms in Excel files
xlCompare is a tool to compare VBA projects in the Excel files for differences. This VBA diff tool performs comprehensive comparison of your Excel files and gives you detailed color-coded report with highlighted changes.
Rich set of options, command line mode, integration with GIT, Perforce and SVN, 3-way comparison of VBA code makes xlCompare ultimate vba diff and merge tool for Excel developers.
Find changes in VBA Projects in the Excel files
VBA Diff Tool (xlCompare©) in the action
Compare VBA Code in Excel files
xlCompare compares VBA projects in the Excel files for differences. You get comprehensive report for the compared VBA code modules.
Compare VBA Forms in Excel files
xlCompare compared Forms and Controls in the VBA projects in the Excel files. If something was changed on the VBA Form, you will be pointed to this modification.
Merge changes in the VBA Code
How to merge changes in the VBA projects? Forget about it if you are using xlCompare. Armed with this tool you don't need to export your code and import it back. All merge operations are done in xlCompare. In a few clicks you will get your job done.
How to compare VBA Code in Excel files for differences
Below we've placed step-by-step instruction on how to compare two Excel files for differences in the VBA code.
- Drop your Excel files into xlCompare window from the Windows explorer.
-
After second file is dropped, xlCompare immediately gives you Comparison Wizard window. Comparison Wizard is a window where you can select pairs of compared worksheets, VBA modules and VBA forms.If your workbooks have similar structure - just click Compare button. Otherwise, select VBA tab and make sure that VBA modules are linked properly.Complete this Wizard by clicking Compare button.
-
Results from the compared VBA modules are on your screen
That's all you need to do. Just in a few simple clicks you get results on your screen.
Compare this procedure with the exporting VBA code, that was described above. xlCompare looks much more effective, right?
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?
Compare VBA Forms in Excel workbook
There are only two methods to compare VBA forms in your VBA projects:
- Use xlCompare
- Compare VBA Forms manually
Second method is just a wasting your time. It is very time-consuming work with high risk of error. So, we don't recommend it.
xlCompare compares VBA Forms as easy as VBA code
xlCompare has own Visual Basic Viewer that shows contents of the Visual Basic project, including all forms and controls. In the screenshot below you see structure of the Form, represented in the hierarchical tree form. You can browse all controls in the native way.
Look into the image below. xlCompare highlights controls that was added in one of the versions of the Form.
3-way Compare and Merge Tool for Excel Files
xlCompare is a tool that allows to compare 2 Excel files, that have common base version. This is called 3-way comparison.
If you are VBA developer, this is a must have option. xlCompare displays changes made in two different versions and allows to resolve merge conflicts.
In the modern development, where Visual Basic programs has thousands of lines of code, xlCompare saves a lot of time and became an ultimate VBA diff tool.
The screenshot below shows xlCompare in the 3-Files mode. We've compared 3 Excel files for differences and brings you this color coded report.
Modifications detected by xlCompare
- Changed lines of code
- Conflicts: lines modified in both concurrent versions of Excel file
- New lines of VBA code
- New functions
I have a question about xlCompare
Please, describe your question or inquiry in the form below. We will be happy to respond you!