Lock Project from Viewing

To prevent unauthorized access to the VBA code, lock the project from viewing and set the module password to open your project in the VBE. In the VBE, select the project in the Project Explorer. Then select Tool | project Properties. (project is the name of your project, that is, your database). This displays the Project Properties dialog box for your project, as shown in Figure 16-8.

Select the Protection tab as shown in Figure 16-9.

Figure 16-8

On the Protection tab, check the box next to Lock project for viewing. If this option is selected, you are required to enter a password. Specify a password in the Password text box and reenter the password in the Confirm Password text box. Click OK to save the password.

To test the module password, return to Microsoft Access and close the database. Reopen the database, then open the VBE, and select the project. The project Password dialog box displays requesting the password.

0 0

Post a comment