Microsoft Office 2000/Visual Basic Programmer's Guide   

Securing an Access, Excel, PowerPoint, or Word Add-in's VBA Project

If you want to protect your code and prevent users from changing it, you can set a password for the add-in's VBA project. To set the project password, click VBAProject Properties on the Tools menu in the Visual Basic Editor. On the Protection tab, select the Lock project for viewing check box, and then enter a password and confirm it.

For more information about securing VBA projects, see Chapter 17, "Securing Office Documents and Visual Basic for Applications Code." For more information about securing Access databases, see Chapter 18, "Securing Access Databases."