About this VBScript comparison
Old VBScript automation and VBA macros are often copied and edited by hand, so it is hard to tell which copy is current. Comparing two versions shows every changed line and marks the names and values that differ.
The same works for VB.NET code, which you can pick in the syntax menu.
What changed in this sample
AddNumbers(a, b)was renamed toCalculateTotal(x, y).num1,num2andsumbecamea,bandtotal, set to 12 and 18.- The
Ifthreshold went from 15 to 20 and the console messages changed with it.
Tips for comparing VBScript
- Ignore case
- Visual Basic is not case sensitive. Turn on Ignore case so
DimandDIMare treated as the same. - Compare VBA macros
- Export each module from the VBA editor (File › Export) or copy its code, then paste both versions here.
- Windows line endings
- Scripts saved on Windows use CRLF. Line endings are never counted as changes.
- Keep both copies
- Save the comparison in the browser so you can come back to it while you merge the scripts.
How to compare VBScript online
- Paste the older version into Original and the newer one into Changed, or open a file on each side.
- Check that the syntax menu says VBScript, then pick split or unified view.
- Step through the changes with the arrows or Alt ↓, and use Settings for options such as ignoring blank lines.
- Save the comparison in your browser, share a link, or download it as a .diff, HTML or PDF.
VBScript comparison: questions
Can I compare Excel VBA macros?
Yes. Copy the code of each macro into the two panes. The workbook itself cannot be compared, only the code.
Is VB.NET supported?
Yes. Pick VB.NET in the syntax menu for .NET code, or VBScript for .vbs files.
Does it run the script?
No. The script is only compared as text.