Applies To
Excel for Microsoft 365 for Mac Word for Microsoft 365 for Mac PowerPoint for Microsoft 365 for Mac Excel 2024 for Mac Word 2024 for Mac PowerPoint 2024 for Mac Excel 2021 for Mac Word 2021 for Mac PowerPoint 2021 for Mac

You can set the properties for a Visual Basic project, and then set how you want to help protect the project.

Do either of the following:

Set the project properties

  1. To begin, On the Tools menu, select Macro and choose Visual Basic Editor.

  2. On the Tools menu, select VBAProject Properties (In Word, select Normal Properties), and then choose the General tab.

  3. In the Project Name box, enter the name that identifies your component in the registry of the Object Browser.

    The project name is the name of the type library for your component. The type library, or TypeLib, contains the description of the objects and interfaces provided by your component.

  4. In the Project Description box, enter the description that will display in the Description pane at the bottom of the Object Browser.

  5. In the Conditional Compilation Arguments box, enter the constant declarations used for conditional compilation.

Help protect the project

You can lock a project to help prevent someone from changing it or set a password to view the project properties.

  1. On the Tools menu, select VBAProject Properties, (In Word, select Normal Properties), and then choose the Protection tab).

  2. To lock your Visual Basic project, select the Lock Project for Viewing check box.

  3. Under Password to View Project Properties, in the Password box, enter the password and then in the Confirm Password box, enter the password again.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.