MS Project VBA Permissions Not Working: Fix Guide
In this article
If macros in Microsoft Project are blocked or VBA code fails with a permission error, the cause is almost always one of three things: the Trust Center macro settings, the file's location (not in a Trusted Location), or Windows blocking the file because it came from another computer. The fix is to enable macros for the session, add the folder to Trusted Locations, and unblock the file in File Explorer. Below is the exact sequence, plus what to do when the usual toggles do not stick.
What You'll Need
- Microsoft Project desktop (Project Plan 1 or later, or a perpetual version). VBA is not available in Project for the web.
- Administrator rights on the PC if Trust Center settings are locked by group policy.
- The macro-enabled file saved as .mpp with VBA inside, or an .mpp that calls a macro.
Step-by-Step
- Open the file and note the yellow bar. When Project opens a file containing macros, a Security Warning bar appears below the ribbon. Click Enable Content if you trust the source. This enables macros for that session only; the next time you open the file the bar returns. That is normal, not a bug.
- Check the macro setting in Trust Center. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings. Choose Disable all macros with notification (the recommended default) so you get the yellow bar and can enable per file. If it is set to Disable all macros without notification, no bar appears and every macro silently fails — this is the most common reason VBA "does not work." Labels can differ slightly by Project version and region.
- Add your project folder to Trusted Locations. In the same Trust Center dialog, open Trusted Locations and click Add new location. Browse to the folder where your .mpp files live (for example a local projects folder, not a synced OneDrive path if you can avoid it), tick Subfolders of this location are also trusted if you keep files in subfolders, and confirm. Files in trusted locations run macros without the yellow bar.
- Unblock the file in File Explorer. Right-click the .mpp file > Properties. If you see an Unblock checkbox or button on the General tab (shown when the file came from email, a download or another network), tick it and click OK. Repeat for any .bas, .cls or .frm files you import.
- Confirm VBA is installed and the reference is intact. In Project press Alt+F11 to open the VBA editor. If the editor opens but your code errors on objects like Application or Project, go to Tools > References and check for entries marked MISSING. Untick the missing one, click OK, then re-open References and re-tick the correct Microsoft Project object library.
- Test with a minimal macro. In the VBA editor, insert a module and add a one-line procedure such as
Sub TestMsg() MsgBox "VBA is running" End Sub. Run it with F5. If the message box appears, permissions are fine and the original problem is in your code or its references, not security. - Check group policy if settings are greyed out. In managed environments, Trust Center options can be locked by an administrator. If the macro settings are greyed out, ask IT to allow macros for Project or to add the folder to the trusted locations list via policy. You cannot override this locally.
Common Mistakes
- Setting macros to Disable all macros without notification and then wondering why nothing runs. Use the notification option instead.
- Adding the file itself rather than its folder to Trusted Locations. Project trusts folders, not individual files.
- Trusting a OneDrive or SharePoint synced path that changes per user. Use a stable local path for macro-heavy projects.
- Forgetting to unblock after downloading a template or receiving a file by email.
- Assuming Project for the web supports VBA. It does not; you need the desktop app.
Tips
- Keep a dedicated folder such as C:\ProjectMacros as a trusted location so every file you drop there runs without prompts.
- Save macro code in a personal template or a .mpp you control, and keep a backup copy outside the trusted folder.
- After changing Trust Center settings, close and reopen Project so the new policy takes effect.
- If you share files with colleagues, tell them the folder must be trusted on their machine too; trust settings do not travel with the file.
Troubleshooting
If the yellow bar never appears and macros still fail, re-check the macro setting first — it is the single most common cause. If the bar appears but Enable Content does nothing, close Project, unblock the file in File Explorer, and reopen. If the VBA editor itself will not open, repair the Office installation via Settings > Apps > Microsoft Project > Modify > Repair (wording varies by Windows version). If code fails only on one machine, compare Trust Center settings and References between the two. If settings are greyed out, it is a policy issue for your administrator. As a last resort, create a new .mpp, import your modules through the VBA editor's File > Import File, and test again — this rules out corruption in the original file.
Frequently Asked Questions
Why do macros work in Excel but not Project?
Trust Center settings are per Office application. Enabling macros in Excel does not change Project's macro setting; set it separately in Project's Trust Center.
Do I need to enable macros every time I open the file?
Only if the file is outside a Trusted Location. Files inside a trusted folder open without the security bar.
Can I use VBA in Project for the web?
No. VBA requires the Project desktop application. Project for the web does not run macros.
Why is the Enable Content button missing?
Usually because the macro setting is set to disable all macros without notification, or the file is already trusted. Check Trust Center > Macro Settings.
Does unblocking a file reduce security?
It removes the Mark of the Web for that file only. Only unblock files you trust and know the source of.
Can group policy stop me changing these settings?
Yes. If options are greyed out, an administrator controls them and you need IT to adjust the policy.