Skip to content
Step-by-step procedures
For XLSM files
- Open the XLSM file with 7-Zip (right click -> 7-Zip -> Open archive).
- Copy the xl/vbaProject.bas (or .bin) file out of the file (you can drag and drop from 7-Zip), don’t close 7-Zip
- Open the vbaProject.bas (or .bin) 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.
You might also be interested in…
External references
Hey man, you save my life, thanks works 100%
Was .bin vs .bas, but thank you!
Thanks for your comment es. I updated the post adding this possibility of finding a .bin file instead of a .bas.