Removing an Excel Workbook VBA Password

A VBA project password can be removed with a hex editor.

Close the workbook and open the workbook file in the hex editor.

Find the string "DPB" and change it to "DPx". Save the file.

Open the workbook and click OK until the workbook is open (one or more dialogs are displayed describing
various problems with the VBA project).

Press ALT+F11, choose the menu command Tools->VBAProject Properties, navigate to the Protection tab, and change the password but do not remove it (note the new password).

Save, close, and re-open the workbook. Press ALT+F11 and enter the new password.

Choose Tools->VBAProject Properties, navigate to the Protection tab, and remove the password.
Save the workbook.

17 comments:

Vijay said...

Great...!
It's work.
Thank you sharing your valuable knowledge
-
Vijay Sapkale

Anonymous said...

Absolutely brilliant. Thanks!

Anonymous said...

this is AWESOME. Thanks a million!

Karel said...

Super, works like a charm!

Is it possible to unprotect an Excel Macro-Enabled Workbook (.xlsm) file to?

zitrus said...
This comment has been removed by the author.
zitrus said...

Work like a charm, thanks.

Is it possibble to unprotect Excel Macro-Enabled Workbook (*.xlsm) file to?

Excel_Ant said...

YES IT IS possbile to unprotect Excel Macro-Enabled Workbook (*.xlsm).. Check my other blog for the same...

http://excel-formula.blogspot.in/2011/12/removing-excel-workbook-vba-password.html

Anonymous said...

Good one... but having problem with xlsm files

Thanks

Unknown said...

Unable to Find " DPB" Any other way to open password protected Excel File
Thanks

Unknown said...
This comment has been removed by the author.
Anonymous said...

Change of DPB to DPX worked and I could see few changes in the work sheet, however lot many sheets are still hidden and password protected. Any way out?

Anonymous said...

open the file and save as xls file (Previous format), do the hex editing and save
Now u should be able to open the file and save it back to xlsm

Anonymous said...

Doesn't work. There is no DPB in my file.

Anonymous said...

Very Nice Post.

But, this will work out only for excel version 2003 or earlier. Could any one let us know the procedure for 2007 and later?

Thanks much in advance

Anonymous said...

Thanks for the solution.. I am able to find the DPB sectiona nd able to edit. But when i tried to open the file using excel option, It prompts an error messgae as 'File is corrupted'. Could you please guide us on this?

Thanks much in advance.

Anonymous said...

I'm trying to remove the password protection from an Excel 2010 workbook. I have opened the file in a hex editor, but it doesn't find a "DPB" string. Any help would be much appreciated. Thank you!

Anonymous said...

Hi,


I tried with this. But its prompting for a password when we naviagte to tools--> vba project properties.. Iam notable to proceed.could you pls help

Post a Comment