Compare VBA / macro code
See exactly what changed in your macros
Compare the VBA in two versions of a workbook, module by module, across standard modules, class modules, and userforms. No exporting every .bas to disk and text-diffing it by hand.
A macro diff that reads like code
When a workbook’s behavior changes, the answer is usually in the macros. SheetDelta shows the change where it happened — the module, the procedure, the lines:
Module: modPricing
Function ApplyDiscount(amount As Double) As Double
- ApplyDiscount = amount * 0.9 ' old: flat 10% off
+ ApplyDiscount = amount * (1 - DiscountRate)
End Function
Sub RecalcAll()
+ If DiscountRate > 0.5 Then Err.Raise 5 ' new guard
Worksheets("Pricing").Calculate
End Sub
Now “the discount calculation changed” has a precise answer:
ApplyDiscount in
modPricing stopped using a flat 10% and started
reading a DiscountRate, and a new guard was added
to RecalcAll. That’s reviewable. “VBA differs”
is not.
Why the usual workaround hurts
Without a tool, comparing macros means exporting every module to a
.bas, .cls,
or .frm file, doing the same for the other version,
and text-diffing the two folders. It’s tedious, and it’s easy to get wrong:
' The usual workaround, by hand, every time:
' 1. Open each workbook in the VBA editor (Alt+F11)
' 2. Right-click every module → Export File… (.bas / .cls / .frm)
' 3. Repeat for the other version into a second folder
' 4. Text-diff the two folders
' 5. Re-import the modules if you actually wanted to merge a change
'
' Miss one module and you miss the change. Forms export as a
' .frm + .frx pair; the .frx is binary, so a text diff can't read it.
Miss one module and you miss the change entirely. Userforms are worse: each exports as a
.frm plus a binary
.frx, and a text diff can’t read the
.frx at all. And if your real goal was to bring a
change across, re-importing the wrong file quietly overwrites the wrong module. SheetDelta
reads the VBA project out of the workbook directly, so none of that applies.
What the VBA comparison covers
Module-by-module
See exactly which modules changed and what changed inside each — added lines, removed lines, changed lines — instead of one blob marked “VBA differs”.
Standard, class, and form modules
Covers standard modules (.bas), class modules (.cls), and the code behind userforms (.frm), so nothing is silently skipped.
No export, no re-import
SheetDelta reads the VBA project out of the workbook directly. You don’t dump every module to disk first and you don’t risk re-importing the wrong one.
Reads VBA, never runs it
The engine parses the macro code to compare it. It never executes a macro, so comparing a file can’t trigger anything inside it.
Alongside the cells
A VBA change rarely arrives alone. The same comparison shows the formula and value changes too, so you see the macro edit and the cells it touched together.
Three places to run it
The desktop app for offline work, the hosted platform for team review and history, and the GitHub Action for a diff on every pull request.
Three places to compare VBA
It’s one engine. Pick the surface that fits how the workbook moves through your team. The free web tool isn’t on this list on purpose — it compares cells, not macros.
Desktop app offline
A one-time purchase that compares VBA modules entirely on your machine, with the full engine for formulas, charts, pivots, and .xlsb/.xls. For macro workbooks that can’t touch a cloud. See the desktop app.
Hosted platform team
Watches your SharePoint or OneDrive, diffs each new version including the VBA, and adds review comments, sign-off, and an audit trail. So a macro change gets reviewed before it’s trusted. Explore the platform.
GitHub Action CI
Posts a module-level VBA diff as a comment on every pull request that touches a workbook, so macro changes get reviewed like code. The same engine ships as a CLI for any other pipeline. See Git diff for Excel.
Frequently asked questions
Can the free web tool diff VBA?
How does SheetDelta compare modules?
Does it handle class modules and userforms?
.frx file that a plain text diff can’t read anyway. Do I need to export the modules to .bas files first?
Is it safe to compare a workbook full of macros?
Stop exporting modules to diff them
Compare VBA module by module offline in the desktop app, or for the whole team on the platform with review and history.