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++.
-
Karan thanks. The problem was not with the excel document but I am not able to view the code that was done by another employee. It's on the VB Ide that I can use thru excel– user365483Sep 6, 2014 at 8:18
-
Ok, if the Excel workbook itself is not password protected and only the VBA project inside is, see below.– KaranSep 7, 2014 at 0:23
-
I am not able to install any hex editor and the file is a .xlsm file. Karan I it would be nice if there is a alternative– user365483Sep 8, 2014 at 13:22
-
here's how– user222864Oct 23, 2014 at 10:15
-
Is there a way to crack the password on an Excel VBA Project?– phuclvApr 6, 2020 at 7:46
1 Answer
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
-
Does this work for MS office 2013 with the older files? I have an impression Microsoft patched this.– MenelaosFeb 19, 2015 at 12:42
-
2When I tried this method in Office 2010 & 2013, it didn't work directly. After following all the steps, I was not able to view the macros, then I tried to export the macro as .bas, I could get the macro out and view it.– AbbasMar 31, 2015 at 14:34
-
This was tested with Office 2010 and that's where the screenshots are from. Also, for those who cannot install a hex editor, there are lots of portable ones available.– KaranApr 5, 2015 at 2:09
-
1
-
I followed all of the steps, but after hitting OK on the warning I get a new prompt where my options are "open and repair" or "cancel." If I hit cancel it closes; if I hit open and repair it delete all macros. I'm using Excel 2011 for Mac. Has anyone else encountered this and is there a workaround? May 3, 2016 at 19:36