Skip to main content
The World's Best Known Brand for Microsoft Project and Project Server Expertise

Project Server Experts Community Site

Go Search
Project Server Experts Community Site
Project Server Help Blog
MSProject Experts
Training Schedule
  
Project Server Experts Community Site > Project Server FAQ KnowledgeBase > SaveVBAToEnterpriseGlobal  

Web Part Page Title Bar image
How do I create a VBA procedure or event that is available to all projects in the Project Server database?

You May Have Been Automatically Redirected to This Page, Which Has a New Address (URL). Please Update Your Bookmarks / Favorites Accordingly.

Background Information

Project Server administrators frequently want to make a VBA procedure or event available to all projects in the Project Server database. To attempt this, you can add the VBA code to an enterprise project template, but you cannot force every project manager to use the template. Worse yet, if you update the code, you must manually update each project template and every project individually.

Resolution

Add the VBA code to the Enterprise Global file. The system makes all VBA code in the Enterprise Global file available to all enterprise projects and updates the latest version of the VBA code automatically each time a project manager logs into Project Server through Microsoft Project Professional. To add your VBA code to the Enterprise Global file, complete the following steps:

1. Launch Microsoft Project Professional and log into Project Server with administrator permissions

2. Before making changes to the Enterprise Global, backup the file using Tools > Enterprise Options > Backup Enterprise Global

3. Click Tools > Enterprise Options > Open Enterprise Global

4. Click Tools > Macro > Visual Basic Editor

5. Click View > Project Explorer if the Project Explorer sidepane is not displayed in the Visual Basic Editor window

6. Select the Enterprise Global by double-clickingThisProject (Checked-out Enterprise Global)” in the Project Explorer sidepane, as shown in the following illustration

 

Visual Basic Editor: ThisProject selected

7. Enter your VBA code

8. Save the VBA code

9. Close the Visual Basic Editor window

10. Save and close the Enterprise Global

11. Exit and relaunch Microsoft Project Professional

Note: From this point forward, all enterprise projects will have access to this code. Depending on the Security Level set using Tools > Macro > Security, your project managers may see a security warning each time they launch Microsoft Project Professional and log into Project Server.