Prevent someone from reading your macros


Is there an easy way to prevent someone from reading/changing the macros that I put in my workbook?



Thank you both for the help! I appreciate you insight Variatus but Don's included the simple instructions that I needed. I don't need major security thankfully, just to keep coworkers from breaking things.
emily23 (rep: 2) Nov 10, '17 at 3:11 pm
Add to Discussion


Selected Answer

Variatus has good tips, and here are the actual steps to take:

Go to the VBA Editor window (ALT + F11) > Tools > VBAProject Properties > Protection tab > check next to Lock project for viewing > enter a password below there > Hit OK.

Here is out tutorial for this:

Password Protect Excel VBA Macros


You can set a password for the VBA Project in the VB editor window. Note that the password will not take effect until you save, close and reopen the workbook.

Also note that the password doesn't securely protect your code from determined attack. There are easy to follow instructions for breaking into protected VBA code available on the Internet. More security is afforded by using COM add-ins written in a .NET language and stored in compiled format. However, to keep friendly colleagues from messing with your code password protection is very effective.


Answer the Question

You must create an account to use the forum. Create an Account or Login