G
glen.e.mettler
Using 2003
I am evaluating a project that has lots of large lags - FS & SS
I need to reduce the overall project duration by 10%.
I have reduced all of the critical path and near critical path tasks by
10%.
However, the lags are posing a problem with final reviews and delivery
dates because the lag is hard coded. This is especially true of the SS
lags.
I have created a macro to reduce lags by 10% for labs > 20 days but it
doesn't work.
Sub changelag()
NumTasks = ActiveProject.Tasks.Count
For t = 1 To NumTasks
If Not ActiveProject.Tasks(t).Summary Then
If ActiveProject.Tasks(t).PercentComplete Then
Else
predcount =
ActiveProject.Tasks(t).PredecessorTasks.Count
For pc = 1 To predcount
preduniqueid =
ActiveProject.Tasks(t).PredecessorTasks.Item(pc)
curlag =
(ActiveProject.Tasks(t).TaskDependencies(pc).Lag) / 480
If curlag > 20 Then
curlag = Int(curlag * 0.9)
'IT CRASHES ON THE NEXT LINE
ActiveProject.Tasks(t).TaskDependencies(pc).Lag
= curlag
End If
Next pc
End If
End If
Next t
End Sub
Any thoughts/fixes?
Glen
I am evaluating a project that has lots of large lags - FS & SS
I need to reduce the overall project duration by 10%.
I have reduced all of the critical path and near critical path tasks by
10%.
However, the lags are posing a problem with final reviews and delivery
dates because the lag is hard coded. This is especially true of the SS
lags.
I have created a macro to reduce lags by 10% for labs > 20 days but it
doesn't work.
Sub changelag()
NumTasks = ActiveProject.Tasks.Count
For t = 1 To NumTasks
If Not ActiveProject.Tasks(t).Summary Then
If ActiveProject.Tasks(t).PercentComplete Then
Else
predcount =
ActiveProject.Tasks(t).PredecessorTasks.Count
For pc = 1 To predcount
preduniqueid =
ActiveProject.Tasks(t).PredecessorTasks.Item(pc)
curlag =
(ActiveProject.Tasks(t).TaskDependencies(pc).Lag) / 480
If curlag > 20 Then
curlag = Int(curlag * 0.9)
'IT CRASHES ON THE NEXT LINE
ActiveProject.Tasks(t).TaskDependencies(pc).Lag
= curlag
End If
Next pc
End If
End If
Next t
End Sub
Any thoughts/fixes?
Glen