Bypass and remove the VBA password in Excel

Posted By : matt.nelson at 6:11 pm, 23 July 2010    In Group : Excel

Excel IconSo, you want to get at some code that you saved in an excel spreadsheet but you can't remember the VBA password! Dont worry, there are a couple of simple ways to bypass this password altogether.

There are two simple options to get your code back. Option one is simply to open the excel file up in OpenOffice. This will ignore the VBA password and give you the code straight away.

Option two involves editing the file with a hex editor. I use the 'Free Hex Editor' that can be downloaded from here.

  1. Hex exampleStep 1 - Open the file up in your hex editor
  2. Step 2 - Search for the line DPB="
  3. Step 3 - Edit this so that it shows DPx="
  4. Step 4 - Save the file, then open it in excel.

That should be it. When you open the file from within excel, it will show an error message about finding an invalid key. Ignore this and go striaght into the code editor (Alt + F11). Make sure that the first thing you do is to set another password on the file. This will get rid of the 'Invalid Key' error message.



Comments for Bypass and remove the VBA password in Excel

  1. Matt Nelson says:

    This is a test comment

  2. Matt Nelson says:

    This is the second test comment

Leave a Reply