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!

2 thoughts on “Remove VBA Password from Excel 2007/2010 file”

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

Leave a Reply

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

Captcha * Time limit is exhausted. Please reload CAPTCHA.