Remove Password from VBA Project
For XLSM files:
- Open the XLSM file with 7-Zip (right click -> 7-Zip -> Open archive).
- Copy the xl/vbaProject.bas file out of the file (you can drag and drop from 7-Zip), don't close 7-Zip
- Open the vbaProject.bas file with HexEdit
- Search for "DPB=" and replace it with "DPx="
- Save the file
- Copy this file back into 7-Zip (again, drag and drop works)
- Open the XLSX file in Excel, if prompted to "Continue Loading Project", click Yes. If prompted with errors, click OK.
- Press F11 to open the VBA editor.
- Right click on the VBA project, select properties. Open the Protection tab then uncheck "Lock project for viewing". Press OK
- Save and Close the XLSM file
- Re-open the XLSM file and proceed to edit/view the VBA project macros.
For XLS files:
- Open the XLS file with HexEdit
- Search for "DPB=" and replace it with "DPx="
- Save the file
- Open the file in Excel, if prompted to "Continue Loading Project", click Yes. If prompted with errors, keep clicking OK.
- Press F11 to open the VBA editor.
- Right click on the VBA project, select properties. Open the Protection tab then uncheck "Lock project for viewing". Press OK
- Save and Close the XLS file
- Re-open the XLSM file and proceed to edit/view the VBA project macros.