Excel unlock VBA or worksheet without password

. . . .
.

Unlock Excel VBA password without password

This steps is can work on Windows computer.

  1. Open foo.xlsm as ZIP file, right click on foo.xlsm and use 7-zip open it

  2. Enter xl folder and right click vbaProject.bin to open it

  3. Find DPB= in vbaProject.bin and replace to DPx=

  4. Close 7-zip window

  5. Open foo.xlsm by double click it

  6. Go to file > Save as, create new Excel file, e.g.: foo_unlock.xlsm

  7. Open foo_unlock.xlsm by double click it

  8. Now can go to Developer > Visual Basic, and can view VBA code without passwrd

Source: https://stackoverflow.com/a/48415913


Unprotect Excel worksheet without password

  1. Open foo.xlsm as ZIP file, right click on foo.xlsm and use 7-zip open it

  2. Enter xl folder and enter worksheets folder

  3. Open sheet<number>.xml by right click it

  4. Find sheetProtection and remove all of string in this tag. e.g.: <sheetProtection algorithmName="SHA-512" hashValue="XXXXX==" saltValue="XXXXX==" spinCount="100000" sheet="1" objects="1" scenarios="1"/>

  5. Save this xml file, and close 7-zip window

  6. Now you should can open foo.xlsm and edit something in worksheet


Tags: None