How to Remove Excel Macro Password

Ever encounter an old Excel VBA macro project locked by password. Chances are, you have forgotten what is the password. This method from stackoverflow is the best that I can use to unlock and remove the password easily!

Things you need will be a Hex editor. I use Textpad++ with Hex editor plug in.

  1. You may want to backup your file before changing.
  2. Open xls file with a hex editor in Textpad++.
  3. Ctrl Find and search for DPB
  4. Replace DPB to DPx
  5. Save file.
  6. Open file in Excel.
  7. Click “Yes” if you get any message box. It usually will show a corrupted message information.
  8. In the Visual Basic Editor window, click Tools -> VBA Project Properties.
  9. The VBA Project – Project Properties window opens. Select the Protection tab, tick the Lock project for viewing, enter and confirm a password, then click OK.
  10. Enter new password.
  11. Save and Close.
  12. Open the file with Excel.
  13. You will notice that there is no error message box.
  14. Enter your new password when you open to view VBA project. Viola!

Below steps is optional to remove the password.

  1. In the Visual Basic Editor window, click Tools -> VBA Project Properties.
  2. The VBA Project – Project Properties window opens. Select the Protection tab, untick the Lock project for viewing, then click OK.
  3. Save and Close.
  4. Open the file with Excel.
  5. Click to view VBA project and you are able to view without any password.

Reference

Stackoverflow
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s