How to track the event "change of position of the task" in the Gantt chart? (C#, VBA) RRS feed

  • Question

  • I created a "grouping." Grouping is performed by the field "start date" of tasks.
    I grouped the tasks by the "start date" field.
    In the Gantt chart, I change the position of the task.

    Result: in the task list, the date of the task that I moved has changed, but the task itself has not moved to another grouping category.
    In order for the task to move to another category of grouping, I have to perform grouping again (update grouping).

    1. How can I make the grouped task list automatically update after moving the task to the Gantt Diagram?
    2. How to do this programmatically using C# or VBA?
    3. Can this be done using standard MS Project tools?

    Project Object Model - link

    • Edited by prog1003 Monday, December 2, 2019 11:21 AM
    Monday, December 2, 2019 9:40 AM


  • Hi,

    I created a Macro which removed and then reapplied the grouping.  I then copied the macro code into the On-Change event for the project.  Works a treat, but very tactical!

    Ben Howard [MVP] | web | blog | book | downloads | P2O

    • Marked as answer by prog1003 Thursday, December 26, 2019 10:14 AM
    Monday, December 2, 2019 2:26 PM