How To Get Past A Password Protected VBA Project In Excel

Had this come up at work recently. Someone left the company, report they created in Excel needs to be changed, no one knows the password he used to protect the project. So what do you do?

I found some instructions on Schmitti’s page on how to do this. This describes how to get pass, i.e. crack an Excel 2000/XP/2002 where the VBA module has a password you can no longer remember (or someone left the company and didn’t tell you the password). This will not work on Excel 97 and has not been tested on versions of Excel newer then 2002.  BE SURE TO SAVE A COPY OF THE EXCEL FILE BEFORE TRYING THESE STEPS

  1. Get a hex editor. A couple of free ones are Free Hex Editor Neo or HexEdit.
  2. Open the Excel file with the hex editor
  3. Search for the bytes 44 50 42, or for the chars DPB. Be sure there exists after these chars the strings “GC=” and “[Host Extender Info]. Some programmers try to protect projects with a dummy-row within a sheet. Several programs for breaking VBA passwords find this dummy-row, consequently a wrong location. So you should find the right locations above “[Host Extender Info]”
  4. Change the chars DPB to DBx After that, save the file and close the hex editor
  5. Now open the file with Excel. You receive a corresponding error, click “Yes”
  6. Click “OK” to any other error messages that come up.
  7. Access the VBA editor and enter a new password. You must enter a new password.
  8. Confirm and save the file. You can then remove the password if you like.

Tags: ,

Comments are closed.