Say a task has two dependency chains associated with it. For instance, suppose one chain goes from task 2 to 4 to 8 to 10 and another chain goes from 2 to 5 to 9. When looping through the task dependencies object recursively, is there some way to detect when the links shift from one chain to another?
I'm using the approach outlined by Rod Gill on pp 335-6 of his fine book. (See below.) The approach does not seem to differentiate between the two chains--Flag20 is marked for both chains at the same time. I need to process one chain, then the other.
Public Sub DepSucc(Tsk As Task)
Dim Dep As TaskDependency
If Tsk.Flag20 = False Then
Tsk.Flag20 = True
For Each Dep In Tsk.TaskDependencies
If (Dep.To.ID <> Tsk.ID) Then
DepSucc Dep.To
End If
Next
End If
End Sub
RobVV