Thursday, 6 December 2012

For Excel 2007/2010 (.xlsm) files do following steps:

1. Create a new .xlsm file.
2. In the VBA part, set a simple password (for instance 'macro').
3. Save the file and exit.
4. Change file extention to '.zip', open it by any archiver program.
5. Find the file: 'vbaProject.bin' (in 'xl' folder).
6. Extract it from archive.
7. Open the file you just extracted with a hex editor (for example HxD).
8. Find and copy the value from parameter DPB (value in quotation mark), example:
        DPB="282A84CBA1CBA1345FCCB154E20721DE77F7D2378D0EAC90427A22021A46E9CE6F17188A".  (This value generated for 'macro' password. You can use this DPB value to skip steps 1-8)

9. Do steps 4-7 for file with unknown password (file you want to unlock).
10. Change DBP value in this file on value that you have copied in step 8.
>>If copied value is shorter than in encrypted file you should populate missing characters with 0 (zero). If value is longer - that is not a problem (paste as it is).

11. Save the 'vbaProject.bin' file and exit from hex editor.
12. Replace existing 'vbaProject.bin' file with modified one.
13. Change extention from '.zip' back to '.xlsm'
14. Now, open the excel file you need to see the VBA code in. The password for the VBA code
will simply be macro (as in the example I'm showing here).

For those who still using old file format (2003 - .xls) method has less steps:

1. Open .xls file with hex editor (for example HxD).
2. Find parameter DPB, change value for this parameter by our own. If your value is shorter than value in encrypted file, you should populate missing characters with 0 (zero). If value is longer - that is not a problem (paste as it is).

DPB="282A84CBA1CBA1345FCCB154E20721DE77F7D2378D0EAC90427A22021A46E9CE6F17188A".  (This value generated for 'macro' password).
3. Save changes.


  1. Hi! That worked for me. Brilliant... Thanks..

    Although, I don't think we really need the hex editors here. Just a thought.

  2. A simpler way I read about is to load the file in Notepad, search for "DPB" and change the text to "DPx" leaving everything else the same and save. When you load the file back into Excel it detects an error, fixes it by removing the password and then the VBA is unlocked with no password. But thanks, your write-up pointed in the right direction.

    1. Resently I made a marco which can do all the steps automatically, it's much simplier. I could not found similar macro in the Internet, which is quite interesting, maybe because the issue with 'password forgeting' is not actual.

  3. Amazing, luar biasa. Kok jadinya gak ada password apapun yang ampuh ya?
    Apa ada juga cara untuk membuka file excel/word yang kita lupa passwordnya?

  4. It doesn't work. I have tried a several times, but not working. is there an option at least to unhide hidden sheets that are protected

  5. i've tried with Excel 2013 and no result (file not readable... Excel try to repair it and propose to remove VBAProject). I don't know if working on 2007/2010

    1. Maybe you've missed some instructions. If you send me the file I could check.

  6. Hi Anton, Has Excel fixed the glitch? I can't find vbaproject.bin under xl folder.

    1. Some more context : when I replace .xslm by .zip, I do see the 'xl' folder - but I am missing the vbaproject.bin file, I can't see it. Do you think Excel hid it?

    2. Hi Aurelien. The 'vbaProject.bin' should be inside of 'xl' folder, did you look there?

    3. Hi Anton, I did. I can only see the following under xl :
      folder _rels
      folder macrosheets
      folder theme
      folder worksheets
      and non of the subfolder seems to have vbaproject.bin. I am puzzled...

  7. Then it means that your file don't have VBA module/form or class, there is no way that this file could be hidden inside of zip archive. Are you able to see any VBAProject('file name') in VBA editor in your file (Alt+F11)?

    1. So I found an already existing unprotected .xlsm file and it fixed it... rather than creating a .xlsm from scratch. It worked!!

  8. ​Thanks, a great article. I wish a similar method existed for the Word docs that are password protected from opening. I had one with a forgotten password, and I did have to use a commercial tool, namely the service that from what I know supports VBA project passwords too. It did the trick, but did cost money. Hope more freeware tools will appear on the web soon.

    1. Thank you very much!!! i could unprotect my xla file on this service ( for FREE! I didn't expect this.

    2. Actually it worked only once for free.. now it is asking for 19$.

  9. I had to modify the code a little. Kept getting a "do you want to replace the .bin?" dialog box. The macro would move on and delete the tmp file before it was moved. Added a pause via msgbox "Press OK when compression is complete".

  10. Hi Anton
    I've tried with a file in Excel 2007 and It doesn't work. Could you please give me your email?

  11. Thanks Anton - superb stuff

  12. Sometimes it is very difficult to find good content on this topic. But your post is my way to desired information, my problem is solved now. Thanks for posting something worth knowledge
    fcnbusiness |

    sherbornbusiness |

    biotech4business |

    agilebusinessvalue |

    mybusinessprofit |

    streamingforbusiness |

    bradbringsbusiness |

    ecohawaiitours |

    georgiagrouptours |

    horsebaktour |

  13. I am really satisfied with this posting that you have given us. This is really a stupendous work done by you.
    stillandhouse |

    lathamsinterior |

    hunkydory-home |

    treehousepastryshop |

    futurehelphomes |

    natickhouse |

    okhomewindows |

    auditmyhometoday |

    okhomeexteriors |

    yournexthomeexterior |

  14. Hello, I enjoy reading all of your post. I wanted to write a little comment to support you.
    hbc-business |

    lawfirmprofits |

    greatbusinessforum |

    businessjetpeople |

    sagebusinesscoach |

    ageinvestment |

    headlineprofits |

    marketonlineprofits |

    keepyourprofit |

    sneakyhealth |

  15. You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!.
    adsprofitreward |

    fullbusiness |

    doralbusiness |

    millerhillbusiness |

    armturkbusiness |

    businessimperial |

    digitalisbusiness |

    burnin4business |

    cannabusinessschool |

    corebusinessbank |

  16. Perfect! Thanks a lot! It worked for me!!!!

  17. Im using 2010xl and when i try to open the changed xlsm file, excel says it repaired it and deletes the vba project from the file entirely. Im using xp btw

  18. Nice information, many thanks to the author. I believe that anyone who wants to know something about this topic will like the post.I really loved reading blog
    plak bh

  19. You can easily unlock Excel xlsm file password with the use of eSoftTools XLSM file password unlocker software. With this application crack lost or forgotten password from xls, xlsx, xlsm, xltm, xla, xlam and xlsb files.

    Read More

  20. Thanks for sharing the info, keep up the good work going.... I really enjoyed exploring your site. good resource...
    visual basic course london

  21. Best and safe Excel password breaker to know how to break Excel password and recover Excel password with all versions Excel file including xlsx, xls, xlsb, xla, xlam, xltm and xlsm
    Click here:

  22. You can download PDS Excel Password Recovery tool smartly recover lost or forgotten MS Excel file password and unlock excel sheet protection password in easy way.

    Click Here:

  23. Every post containing a lot of information has its own value and everybody love it.
    plak beha

  24. All the contents you mentioned in post are too good and can be very useful. I will keep it in mind, thanks for sharing the information keep updating, looking forward for more posts.plak beha kopen

  25. usefull thank you for your post

  26. Super, thanks a lot. you are really saved my day.

  27. In case any reason you forget excel password and you have to open it, so download eSoftTools Excel Password Recover Software to recover excel file password with Dictionary Attack. Excel Password Unlocker Software ready to break excel password with no damage any excel data, it unlock word and access file password and support all excel version 2019, 2016, 2013, 2010, 2007, 2003, 2002, 2000, 97.

    More Info:-

  28. Nice article. It's very helpful to me. Thank you. Please check my password generator.