Updated and expanded from the original August 28, 2017 post.
Any serious Excel VBA developer eventually faces the need to compare code between two workbooks — tracking what changed between versions, merging contributions, or auditing a client’s project against your own baseline.
A Google search for “vba diff” returns several products, but most carry a price tag.
The one exception is
VBA Code Compare from Formula Software, Inc.:
http://www.formulasoft.com/vba-code-compare.html
The Problem — and the Solution
Because the tool was written in 2006, it predates the .xlsm format and so VBA Code Compare will not open .xlsm workbooks.
The simple fix is to rename the workbooks to change their extensions from .xlsm to .xls. This change satisfies VBA Code Compare’s file-type filter without altering any of the file’s internal content.
Step-by-Step
Make working copies of your two .xlsm workbooks
Rename each: change the extension from .xlsm to .xls
Open both in VBA Code Compare
Run the comparison
Rename both files back to .xlsm when finished
No VBA code is touched. No data is modified. The rename is purely to bypass the file-type ilter.
Other VBA Differencing Tools
VbaDiff — http://vbadiff.com/
xlCompare — http://www.xlcompare.com/compare-vba-projects.asp
DiffEngineX — https://www.florencesoft.com/compare-diff-excel-vba
If this tip saved you time, consider bookmarking the blog or sharing the post with a colleague who works in Excel VBA.