Securing Your Project

Often, your project contains settings or code that you do not want your end users to see. Or, maybe you have made a worksheet very hidden, as described earlier, and do not want someone to easily stumble across it. You can lock your project with a password so that it can't be viewed without the password. To do this, you need to display the Project Properties dialog box (see Figure 2.19). The name given to this is a little confusing because Project Properties can't be viewed in the Properties window. If you haven't named your project, you can view this dialog box by selecting Tools VBAProject Properties. If you have named your project, substitute the name of your project for VBAProject.

To lock your project, select the Protection tab (see Figure 2.20) and check Lock Project for Viewing. Finally, enter a password that either you won't forget or you'll write down somewhere.

Figure 2.19

Don't confuse the Project Properties dialog box with the Properties window in the VBE.

VHÀProject - Project Properties

Genefdl | Protection | Pfoject tjame:

Project Description:

!

Project Help

Help Ne Name:

Content 10:

Conditional Complafcion Arguments:

Figure 2.20

Use the Protection tab to lock your project so that it can't be viewed without a password.

Figure 2.20

Use the Protection tab to lock your project so that it can't be viewed without a password.

TIP Create a passwords file in Excel to hold all of the passwords associated with your projects. You can lock this file with a password and place it in a secure folder. Of course, you'll need to remember the password, but that's just one password rather than many. Until I started using something like this, on a few occasions, I came dangerously close to forgetting a few passwords on important projects that I hadn't viewed for awhile.

NOTE Although no native way exists to recover a lost password, third party products are available that you can use to recover passwords—Google "recover Excel password" to find out about some of these.

0 0

Post a comment