VBA Script for Planning Project Online RRS feed

  • Question

  • Hello Everyone,

    I need your help to set up a VBA on Project Online.

    The objective is : For each tasks which reach 100% progress when editing the billing date switch to today's date. 

    Note that the field "billing date" has a initial planned date. 

    Currently I successfully wrote this script :

    Sub avancement()
    Dim tsk As Task
    Dim prj As Project
    Dim pos As Integer
    Set prj = Application.ActiveProject
    pos = 1
    For Each tsk In prj.Tasks
        If Not tsk Is Nothing Then
            If tsk.PercentComplete = 100 Then
                     prj.Tasks.Application.SetTaskField Field:="A_Date d_envoi", Value:=Now(), TaskID:=pos
            End If
        End If
        pos = pos + 1
    Next tsk

    End Sub

    I would like to Apply the macro task per task every time the project manager is Editing a % of progression of a task to 100% et billing date switch to the Editing day

    Could someone help me please :)

    Best regards,

    Wednesday, July 10, 2019 9:44 AM