How to bypass the VBA project password from Excel
I need help with password retrieval or bypassing the password on a project that was done at work. The author has used MS Excel to do the project, and it's in the client's server. The server that we use has no access to Notepad++.
For older .XLS files:
-
Open file in any hex editor
-
Search for the text "DPB=" (no quotes, you should find it just above "[Host Extender Info]"
-
Change it to "DPx=", save and close the file
-
Open the file in Excel and press Yes if the following warning pops up:
-
Open the VBA editor (Alt+F11) and press OK whenever the following warning pops up:
-
Right-click the VBA project name, select Properties, go to the Protection tab and delete the existing passwords as well as uncheck the Lock project for viewing checkbox:
-
Re-check the Lock project for viewing checkbox and add your own memorable password.
-
OK your way out and now the VBA code is accessible!
For newer .XLSM files:
-
Change the file's extension to .ZIP
-
Open the file in any archiver such as WinRAR or 7-Zip and you'll see the following directory structure:
-
Go into the xl directory and extract vbaProject.bin:
-
Perform steps #1-3 above (from the For older .XLS files section) with vbaProject.bin
-
Replace the old vbaProject.bin in the ZIP file with the new hex edited version
-
Change the file's extension back to .XLSM
-
Perform steps #4-7 above