Unlock Excel VBA password without password
This steps is can work on Windows computer.
-
Open
foo.xlsm
as ZIP file, right click onfoo.xlsm
and use 7-zip open it -
Enter
xl
folder and right clickvbaProject.bin
to open it -
Find
DPB=
invbaProject.bin
and replace toDPx=
-
Close 7-zip window
-
Open
foo.xlsm
by double click it -
Go to
file
>Save as
, create new Excel file, e.g.:foo_unlock.xlsm
-
Open
foo_unlock.xlsm
by double click it -
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
-
Open
foo.xlsm
as ZIP file, right click onfoo.xlsm
and use 7-zip open it -
Enter
xl
folder and enterworksheets
folder -
Open
sheet<number>.xml
by right click it -
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"/>
-
Save this xml file, and close 7-zip window
-
Now you should can open
foo.xlsm
and edit something in worksheet