I'm using MS Project which is connected to a PWA. All users complete their tasks on the online 'Tasks' page. For the task owners, I need a flag that tells them that all the predecessors for their task is complete. I can see how to do this in VBA with the following code:
Sub GetPredStatus()
Dim pj As Project
Dim t As Task 'subject task
Dim p As Task 'Predecessor task
Set pj = ActiveProject
For Each t In ActiveProject.Tasks
If t Is Nothing Then GoTo NextTask
For Each p In t.PredecessorTasks
If p.PercentComplete < 100 Then
t.Flag7 = False
GoTo NextTask
End If
Next p
t.Flag7 = True
NextTask:
Next t
End Sub
The problem is, I need this flag to be 'live' and accurate to task users in the PWA. Is this possible?