Securing an Access, Excel, PowerPoint, or Word Add-in's VBA Project
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
If you want to protect your code and prevent users from changing it, you can set a password for the add-in's Microsoft® Visual Basic® for Applications (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.
- Enter a password, and confirm it.
Building Application-Specific Add-ins | Word Add-ins | Excel Add-ins | PowerPoint Add-ins | Access Add-ins | Adding and Removing Command Bars for Word, Excel, and PowerPoint Add-ins | Controlling Word, Excel, and PowerPoint Add-ins from Code