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 :
- You need to download and install Hex Editor Neo.
- Your locked Excel file.
Follow these steps :
- I recommend you to backup your original Excel file.
- I assume your Excel file is “locked.xlsm / locked.xlsx / etc”.
- Rename your file into zip file, from locked.xlsm to locked.zip.
- 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.
- Open vbaProject.bin with Hex Editor you installed.
- Search for DPB, change to DPX (click on character “B” and type “X”) then save the file.
- 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.
- 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”.
- Open you VBA project, go to Developer Tab – Macros.
- Go to Tools – VBAProject Properties – Protection Tab – Uncheck “Lock project for viewing” and erase all password if any.
- But if you want to set new password, make sure you checked the checkbox and fill with your new password.
- Save, and reopen your file. And your new password or your VBA Project unlocked successfully
Hope this help for you who have a problem that forgot you Excel VBA password but you still want to open it up.