Sistema de blogs Diarium
Universidad de Salamanca
Pablo Gallardo's Blog
My professional web log about IT, Cybersecurity & Project Management
 

How to remove Password from VBA Project in Excel

Step-by-step procedures

For XLSM files

  1. Open the XLSM file with 7-Zip (right click -> 7-Zip -> Open archive).
  2. Copy the xl/vbaProject.bas file out of the file (you can drag and drop from 7-Zip), don’t close 7-Zip
  3. Open the vbaProject.bas file with HexEdit
  4. Search for “DPB=” and replace it with “DPx=”
  5. Save the file
  6. Copy this file back into 7-Zip (again, drag and drop works)
  7. Open the XLSX file in Excel, if prompted to “Continue Loading Project”, click Yes. If prompted with errors, click OK.
  8. Press F11 to open the VBA editor.
  9. Right click on the VBA project, select properties. Open the Protection tab then uncheck “Lock project for viewing”. Press OK
  10. Save and Close the XLSM file
  11. Re-open the XLSM file and proceed to edit/view the VBA project macros.

For XLS files

  1. Open the XLS file with HexEdit
  2. Search for “DPB=” and replace it with “DPx=”
  3. Save the file
  4. Open the file in Excel, if prompted to “Continue Loading Project”, click Yes. If prompted with errors, keep clicking OK.
  5. Press F11 to open the VBA editor.
  6. Right click on the VBA project, select properties. Open the Protection tab then uncheck “Lock project for viewing”. Press OK
  7. Save and Close the XLS file
  8. Re-open the XLSM file and proceed to edit/view the VBA project macros.

 

External references

 

pmgallardo

About pmgallardo

I studied Computer Science at University of Salamanca. Since then, I have been working first as developer and then as SAP consutant. This blog is about problems I dealt when using computers, and more important, the solutions I found. Whenever I am on an issue and suddenlly I have a flash that leads me to a solution, I document my discoveries in a post.

, , , , , , , , , , ,

One Response to How to remove Password from VBA Project in Excel

  1. Joseph Collado 8 August 2022 at 19:04 #

    Hey man, you save my life, thanks works 100%

Leave a Reply


*

Política de privacidad
Studii Salmantini. Campus de excelencia internacional