R
RixMcx
Option Explicit
Sub CopyPhaseDurationToDuration1()
Dim Tsk As Task
Dim Duration1 As Integer
For Each Tsk In ActiveProject.Tasks
If Not Tsk Is Nothing Then 'Test for blank rows
If Tsk.Summary Then
Tsk.Duration1 = Tsk.Duration
Else
Tsk.Duration1 = Tsk.OutlineParent.Duration
End If
End If
Next Tsk
End Sub
I am getting the parent duration and need the GrandParent duration.
I would like to control the code above to return the value of Outline Level
3. The code works the way it is(thanks Rod), but it gives each sub task its
summary task duration. I would like to capture Phase duration. I am not
sure if I would use outline or indent keyword to capture just the Phase
duration.
Sub CopyPhaseDurationToDuration1()
Dim Tsk As Task
Dim Duration1 As Integer
For Each Tsk In ActiveProject.Tasks
If Not Tsk Is Nothing Then 'Test for blank rows
If Tsk.Summary Then
Tsk.Duration1 = Tsk.Duration
Else
Tsk.Duration1 = Tsk.OutlineParent.Duration
End If
End If
Next Tsk
End Sub
I am getting the parent duration and need the GrandParent duration.
I would like to control the code above to return the value of Outline Level
3. The code works the way it is(thanks Rod), but it gives each sub task its
summary task duration. I would like to capture Phase duration. I am not
sure if I would use outline or indent keyword to capture just the Phase
duration.