[TESTED] Remove / Bypass VBA Password in Excel

Here is a solution for you to unlock, remove or bypass password from your Excel VBA Project. A few days ago my friend ask me about this problem. He has an Excel file (macro enabled spreadsheet) which locked by password that he created before, and he forgot the password to open VBA source code.

Well, let’s go to the point. These are what you need :

  1. You need to download and install Hex Editor Neo.
  2. Your locked Excel file.

Follow these steps :

  1. I recommend you to backup your original Excel file.
  2. I assume your Excel file is “locked.xlsm / locked.xlsx / etc”.
  3. Rename your file into zip file, from locked.xlsm to locked.zip.
  4. Open locked.zip with winzip, winrar or something else, get into “xl” folder you will have a file named vbaProject.bin, and extract only this file.
  5. Open vbaProject.bin with Hex Editor you installed.
  6. Search for DPB, change to DPX (click on character “B” and type “X”) then save the file.
    Bypass Excel VBA Password
    Rename DPB to DPX
  7. Open your locked.zip again, replace your (old) vbaProject.bin within locked.zip with (new) vbaProject.bin which you edited before. Close locked.zip, rename (change back the extension to original) it into locked.xlsm again.
  8. Open locked.xlsm and you will see warning message, just ignore them.

    And if you have another warning message like error debug, just click “End”.
  9. Open you VBA project, go to Developer Tab – Macros.
  10. Go to Tools – VBAProject Properties – Protection Tab – Uncheck “Lock project for viewing” and erase all password if any.
  11. But if you want to set new password, make sure you checked the checkbox and fill with your new password.
  12. Save, and reopen your file. And your new password or your VBA Project unlocked successfully :mrgreen:

Hope this help for you who have a problem that forgot you Excel VBA password but you still want to open it up.

Leave a Reply

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