Others

How to Run a Microsoft Project Macro Automatically After Schedule Changes

Aamir Naveed AkramAamir Naveed Akram Nov 2, 2026 872 views

Question details

The user needs to automatically execute a VBA macro whenever schedule data is modified in Microsoft Project without causing performance issues.

How to Run a Microsoft Project Macro Automatically After Schedule Changes
Product
Microsoft Project
Device & OS
not provided
Scenario
Automating task formatting or schedule calculations via a VBA macro triggered by schedule updates.
Observed behavior
The user wants to automate execution but needs to mitigate the performance drop caused by the Project Change event firing on every single edit.
Before you start

Ensure that your Microsoft Project file is saved as a Macro-Enabled Project (.mpp) and that your Trust Center settings allow VBA macros to execute.

Solution 1Recommended

Use the Project Change Event with Conditional Limits

Utilize the Project_Change event to trigger the macro automatically, but add conditional logic to limit execution to specific task-level changes.

The Project_Change event fires every time any data in the schedule is modified. To prevent Microsoft Project from slowing down, you should restrict the execution of your formatting or calculation macros to specific conditions rather than running the full code on every edit.

1
Open the VBA Editor

Press Alt + F11 in Microsoft Project to launch the Visual Basic for Applications (VBA) editor window.

2
Access the Project module

In the Project Explorer pane on the left side, double-click on 'ThisProject' to open the dedicated code window for your current project file.

3
Add the Project_Change event

Select 'Project' from the left dropdown menu at the top of the code window, and then select 'Change' from the right dropdown menu to generate the event subroutine.

4
Insert conditional execution logic

Inside the subroutine, add an 'If' statement to check if the changed fields belong to the specific activity or summary-task levels you are targeting before calling your main macro. This filters out unnecessary executions.

Use the Project Change Event with Conditional Limits
Performance Tip: If you notice typing latency, your macro logic inside the Change event is too heavy. Keep the code inside the Change event as lightweight as possible.
Free Microsoft Office alternative

Manage Project Schedules Effortlessly with WPS Office

Complex VBA macros in Microsoft Project can sometimes slow down your workflow. If you are looking for a highly compatible, free alternative to manage project timelines, Gantt charts, and schedules, WPS Spreadsheet offers an excellent, lightweight solution. It fully supports Microsoft Excel formats and provides robust macro features without the high subscription costs.

  1. 1. Download and Install WPS Office: Visit the official WPS Office website to download the free suite and install it on your computer.
  2. 2. Open a Project Tracker Template: Launch WPS Spreadsheet and browse the built-in template library for 'Gantt Chart' or 'Project Schedule' to start tracking your tasks.
  3. 3. Enable Macros for Automation: If you are migrating existing Excel project trackers with VBA, go to the Developer tab to seamlessly manage and run your macros.
Completely free and highly lightweight to installFully compatible with Microsoft Excel formats (.xlsx, .xlsm, .xls)Supports advanced macros (VBA/JS) for powerful task automationFamiliar user interface requiring zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Project Change event slow down Microsoft Project?

The Project Change event is triggered every single time any value is modified in the schedule. If a macro runs complex calculations or heavy formatting on every keystroke or update, it heavily consumes system resources, resulting in noticeable application lag.

Can I run a macro only when a specific column is changed in MS Project?

Unlike Excel, VBA in Microsoft Project does not have a built-in event specifically for a single cell or column change. You must use the Project Change event and write custom VBA logic to evaluate changes and determine if your target data was affected.

How do I temporarily stop my macro from firing during bulk updates?

You can temporarily disable events in your VBA code by setting 'Application.EnableEvents = False' before running a bulk update or pasting large amounts of data, and then setting it back to 'True' once the operations are complete.