Protecting
You can protect your VBA projects with passwords although your code is not 100% secure.
Adding a password will deter the average user though.
You can protect your code by locking the project for viewing and providing a password (Tools > VBAProject Properties)(Protection tab, "Lock project for viewing").
SS
Code Editor > Project Properties
The name might vary depending whether you have renamed the project
You cannot apply a locked this project password if there is no VBA code and the file extension is .xlsx
VBAProject
The default name used for every VBA project is "VBAProject"
You can change the name of your project to something else, although not many people do this.
If the name of your project has been changed the menu option will not be (Tools > VBAProject Properties) but will be the new name of the project.
Is the Project Protected
Breaking Worksheet Protection
VBA Project - Submitting Password
http://www.siddharthrout.com/2013/04/24/unprotecting-vba-project-password-using-a-password-that-you-know/
Open a new blank workbook.
Copy and paste the code into Module1.
Change the folder location and workbook to the file you want to unlock.
Unlocking the project at run-time using code.
VBA Project - ByPassing Password
link - http://stackoverflow.com/questions/1026483/is-there-a-way-to-crack-the-password-on-an-excel-vba-project
This provides a way to open a VBA project bypassing the password.
This will work on any files (.xls, .xlsm, xlam)
When you try and open a VBA Project a password dialog box is displayed asking the user to enter the password.
This dialog box can be bypassing and it is possible to trick Excel into thinking that the password has been submitted.
The code below replaces the "check and display the password dialog box" with "password has been submitted correctly".
Open a new blank workbook and paste in the following code in a new module "Module1".
Paste the following code in a new module "Module2".
Then open the workbook that contains the password protected VBA project.
Important
If you VBA Project contains NO VBA code but is password protected it will be treated exactly the same as a project that does not contain VBA code.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext