Protect Excel VBA Projects
March 4, 2011 3 Comments
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…
We would see a Project Properties Dialogue.
- Click the Protection tab
- Enable Lock project for viewing
- Enter a password twice.
- Click the OK button.
Now, we can save the file. Next time when we want to view the VBA code, we would have to enter the password first.
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
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
When I said strong password would help, I mean it would take longer time to solve but eventually it would be solved.
Pingback: Protect Excel VBA Projects « Better and Faster Decisions | excel