Run VbaDiff from the Command Line

VbaDiff accepts parameters from the command line. This allows VbaDiff to work alongside batch scripts or source control clients.


Locate the VbaDiffLoader.exe

The command line interface to VbaDiff is provided by VbaDiffLoader.exe. This file will be in the VbaDiff installation directory, which is usually C:\Program Files\Technicana\VBADiff_V5.


VbaDiffLoader.exe can acception zero, one or two parameters:

  • Zero Parameters: loads VbaDiff and opens the main window. This is equivalent to clicking on the Windows Menu Shortcut.
  • One Parameter: this parameter should be a file path. VbaDiff will open, and then load the specified file into the left hand side of the main window.
  • Two Parameters: the first parameter must be a file path, which will be loaded as above. The second parameter should also be a file path. This second file will be loaded into the right hand side of the main VbaDiff window.

Running VbaDiff in this way is subject to the usual rules of the Windows command line. For example, any file paths which contain spaces should be enclosed in double quotes.


Example

The following example will load two files into VbaDiff and automatically compare them.


"C:\Program Files\Technicana\VBADiff_V5\VbaDiffLoader.exe" "C:\Test\Left_Workbook.xls" "C:\Test\Right_Workbook.xlsm"