Protect Excel VBA Projects

I have a blog that described how to protect our Excel worksheet.  A few readers asked me how to protect Excel VBA projects.  It is actually quite simple and you are going to see how easy it is.

Assume we are already in Excel VBA Editor.

  • Click Tools
  • Select VBAProject Properties…

image

 

We would see a Project Properties Dialogue.

  • Click the Protection tab
  • Enable Lock project for viewing
  • Enter a password twice.
  • Click the OK button.

image

Now, we can save the file.  Next time when we want to view the VBA code, we would have to enter the password first.

image

Password protection is very simple to setup; however, password protection is not very secure in Excel environment.  If you Google “Remove Excel Password”, you would find many utilities that claim to be able to unlock your password.  Password protection is a good way to protect your Excel investment against our users who accidentally modify our data / code.  But if we really want to protect our intellectual property, then password protection may not be the most suitable approach.  Of course, a strong password always help!

 

Andrew Chan helps you to make better and faster decisions

About Andrew Chan
Andrew Chan is an Business Consultant who gives you accurate, consistent and timely information so that you can make better and faster decisions. He is an Associate of Society of Actuaries with over 20 years of IT experience. Apart from strong analytical skills and proven technical background, he was also a former system director at Manulife who had extensive project management experience. If you are looking for someone to gather, consolidate, validate, visualize and analyze data, look no further! Andrew can provide the most cost effective business analytics solution so that you can explore, optimize, predict and visualize your business. Don’t guess on any decision, no matter it is finance, operation, marketing or sales! Always ask for evidence!

3 Responses to Protect Excel VBA Projects

  1. PetLahev says:

    As you wrote a VBA password is good only for restricting accidental access to VBE (e.g you have some unexpected error and Excel will switch you to VBE)
    You even don’t need any tool which you mentioned, just download OpenOffice (for free of course) and just open a VBA protected file and you will see …. also if you search in good way, you will find how to break any-long VBA password via some free text editor like PSPad

  2. Andrew Chan says:

    When I said strong password would help, I mean it would take longer time to solve but eventually it would be solved.

  3. Pingback: Protect Excel VBA Projects « Better and Faster Decisions | excel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: