Password protect your Excel VBA code

If your Excel file includes a load of VBA modules and you’re sharing it with other people, or others have access to your network, it is always worth sticking a password on to protect it. Amongst other reasons, this prevents people stealing your hard work and claiming it for themself, or trying to make a tweak and breaking it!

 

With your Excel workbook open, click Alt + F11 to open the VBA window.

 

Go to Tools – VBAProject Properties and click on the Protection tab:

 

PasswordProtectVBA1

 

Tick the box to ‘Lock project for viewing’ and enter your password:

 

PasswordProtectVBA2

 

Simple as that, your code is now protected!

Leave a Reply

Your e-mail address will not be published. Required fields are marked *