It would have happened many times we have created a VBA code and we wish to protect or lock from accessing by someone the code in order to avoid changes, Well we have the solution for it were can Lock/Protect the VBA Project by giving a password for windows & mac users.
Excel Windows users
Go to Developer Tab > click Visual Basic or Press Alt + F11 keys to open Microsoft Visual Basic for Applications window.

- From the menu bar select Tools > VBAProject Properties
- A pop-up window will open “Project Properties”
- Select the “Protection Tab”
- Check the box “Lock Project For Viewing”
- Set your password & Save the project

Close the VBA Editor and make sure to save the file as Excel Macro-Enabled Workbook to make the above steps work
When next time you try to access the module it is denied. Only users with the password can access it.

Excel Mac users
Go to Developer Tab > click Visual Basic or Press opt + F11 keys to open Microsoft Visual Basic for Applications window.

- From the menu bar select Tools > VBAProject Properties
- The pop-up window will open “Project Properties”
- Select the “Protection Tab”
- Check the box “Lock Project For Viewing”
- Set your password & Save the project

Close the VBA Editor and make sure to save the file as Excel Macro-Enabled Workbook to make the above steps work
When next time you try to access the module it is denied. The only users with the password can access it.

Was the information helpful in this blog?
- If yes, hit that share button and show the excitement to the world.
- Subscribe to our free posts.
- If no, please let us know what to improve.