Categories
Programming VBA

Remove VBA Password from Excel 2007/2010 file

Some days ago I had to improve a VBA macro but password was lost, so there was no direct way to enter code in VBE. There are a lot of tricks I found in the WWW, some of them even provide a tool. But do you trust such tools?

Beside that I found a such an easy to use instruction, »hidden« in a blog comment, I must share with you.

  1. Change .xlsm extension to .zip
  2. Open the zipped folder and navigate into the xl folder
  3. Extract the vbaProject.bin file and open it in a Hex Editor
  4. Search for DPB and replace with DPx
  5. Replace the old vbaProject.bin file with this new one in the zip folder (and re-zip)
  6. Change the file extension back to .xlsm
  7. Open workbook and ignore all warning messages
  8. Export the code modules and then re-add them (delete the old ones before)

Thanks to Gordo for this comment!

4 replies on “Remove VBA Password from Excel 2007/2010 file”

1. The title contains the german word “vom” instead of “from a”.
2. On the last line, it is “comment”, not “commend”.

Hi,

this method doesn’t work by me. I get the alert that the system delete vbaProject.bin from the workbook, because of a failure. What can be the reason.

Regards

Oh… I have never had such a problem. I needed this solution only once and it worked for me. Which Office version do you use? I used Office 2013.

Alternatively, you can sedn me your file and I can have a look at?

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload CAPTCHA.