Recover VBA Code

Losing access to your VBA code can be a frustrating business but an all-too-common occurrence. Passwords get lost, files get corrupted, and that key piece of code gets locked away forever.

VbaDiff reads the VBA code directly out of the document file, without starting Microsoft Office. This makes it possible to get to your VBA code without starting Excel, or having to enter your password. This means that VbaDiff can be useful as a VBA recovery tool.

To get access to your VBA code again, follow these steps:

  1. Download a copy of VbaDiff from the download page. Double-click on the downloaded file to begin installation.
  2. Once installation is complete, open VbaDiff from the Windows Start Menu. See How to run VbaDiff.
  3. In the main VbaDiff window, use the left Browse button and select the file you wish to recover from. The project modules will appear in the left panel.
  4. Right cick on the project name and select Export. Choose a directory to export to.
  5. VbaDiff will write all of your code to separate files, one for each module.
  6. Open each of the modules and check that the first lines have been exported correctly. If the first lines are present, this means that VbaDiff was able to read your file correctly.
  7. To fully export all your code, buy and install a Professional license.
  8. Import the code files that VbaDiff wrote into an earlier backup of your Office document.