From time to time, when developing VBA codes it is necessary to compare the VBA code from different projects. A Google Search for “vba diff” will yield links to a number of products that will identify and document VBA differences.
Of all the products listed VBA Code Compare from Formula Software, Inc. is the only freeware product. It can be downloaded from this link:
http://www.formulasoft.com/vba-code-compare.html
Here is a short description of the features of the current version of VBA Code Compare.
VBA Code Compare 0.4 beta (April 2006)
- Supports Word VBA projects (Word 97/2000/2003)
- Supports command line options
- Added ability to open “.MDW” workgroup files
- New option: Ignore columns. This option allows you to specify ignored and compared characters ranges for each line
- Added ability to close open modules.
However, I discovered that VBA Code Compare can also work with current versions of Excel XLSM Workbooks!
I discovered this functionality based on the technique that is used to open XLSM projects to present the underlying XML structure. The technique is carried out by postfixing “.zip” to the XLSM workbook.
With this in mind, I took two XLSM workbooks and postfixed “.XLS” to each one. With this simple modification, I was able to use VBA Code Compare to open both workbooks.
This workaround will not work if Excel 2003 or any earlier Excel releases are on your computer!!!!
Several of the VBA Differencing Products listed on the Google search:
VbaDiff http://vbadiff.com/
xlCompare http://www.xlcompare.com/compare-vba-projects.asp
DiffEngineX https://www.florencesoft.com/compare-diff-excel-vba