B
Bill Bordiuk
Why does Project 2003 (SP2 if it matters) recalculate when you update a task
field (flag, number or text, I've tried them all). Set Project into
Automatic Calculation mode and run the following code:
Sub tst()
Dim t As Task, t0 As Single, i As Integer
t0 = Timer
For Each t In ActiveProject.Tasks
t.Flag16 = Not t.Flag16
Debug.Print "i=" & t.ID & " t=" & Format(Timer - t0, "000.0000")
Next
Debug.Print "Elapsed=" & Format(Timer - t0, "000.0000")
End Sub
Set the Calc mode to Manual and run the code again. In my experience the
code runs over 100 times slower in Autocalc mode leading me to believe that
Project is recalculating after each flag change.
Do you have the same experience? Is there some reason for this? Is there a
work-around? I have a process that needs to update task flags to update the
Gantt display after each calculation and it is unreasonable for a user to
have to wait 80 to 90 seconds for the screen to update every time he changes
a task duration. This does not happen in Project 2000 or 2002, by the way.
Bill Bordiuk
field (flag, number or text, I've tried them all). Set Project into
Automatic Calculation mode and run the following code:
Sub tst()
Dim t As Task, t0 As Single, i As Integer
t0 = Timer
For Each t In ActiveProject.Tasks
t.Flag16 = Not t.Flag16
Debug.Print "i=" & t.ID & " t=" & Format(Timer - t0, "000.0000")
Next
Debug.Print "Elapsed=" & Format(Timer - t0, "000.0000")
End Sub
Set the Calc mode to Manual and run the code again. In my experience the
code runs over 100 times slower in Autocalc mode leading me to believe that
Project is recalculating after each flag change.
Do you have the same experience? Is there some reason for this? Is there a
work-around? I have a process that needs to update task flags to update the
Gantt display after each calculation and it is unreasonable for a user to
have to wait 80 to 90 seconds for the screen to update every time he changes
a task duration. This does not happen in Project 2000 or 2002, by the way.
Bill Bordiuk