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
    – user365483
    Sep 6, 2014 at 8:18
  • Ok, if the Excel workbook itself is not password protected and only the VBA project inside is, see below.
    – Karan
    Sep 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
    – user365483
    Sep 8, 2014 at 13:22
  • here's how
    – user222864
    Oct 23, 2014 at 10:15

1 Answer 1


For older .XLS files:

  1. Open file in any hex editor

  2. Search for the text "DPB=" (no quotes, you should find it just above "[Host Extender Info]"


  3. Change it to "DPx=", save and close the file


  4. Open the file in Excel and press Yes if the following warning pops up:


  5. Open the VBA editor (Alt+F11) and press OK whenever the following warning pops up:


  6. 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:


  7. Re-check the Lock project for viewing checkbox and add your own memorable password.

  8. OK your way out and now the VBA code is accessible!

For newer .XLSM files:

  1. Change the file's extension to .ZIP

  2. Open the file in any archiver such as WinRAR or 7-Zip and you'll see the following directory structure:


  3. Go into the xl directory and extract vbaProject.bin:


  4. Perform steps #1-3 above (from the For older .XLS files section) with vbaProject.bin

  5. Replace the old vbaProject.bin in the ZIP file with the new hex edited version

  6. Change the file's extension back to .XLSM

  7. Perform steps #4-7 above

  • Does this work for MS office 2013 with the older files? I have an impression Microsoft patched this.
    – Menelaos
    Feb 19, 2015 at 12:42
  • 2
    When 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.
    – Abbas
    Mar 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.
    – Karan
    Apr 5, 2015 at 2:09
  • 1
    Works for .xlam files as well. +1 Jul 2, 2015 at 9:57
  • 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?
    – user658182
    May 3, 2016 at 19:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .