G
GA
We have written the following code to delete tasks that have a value of "yes"
in Flag1 (Project Pro 2003)
Dim T As Task
For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
If T.Flag1 = True Then
T.Delete
End If
End If
Next T
However, when the macro is executed, nothing is deleted. Now this sub
routine is being called in a Master project where the links to the
subprojects have been broken in a previous subroutine. It appears to be
ignoring the value in the Flag1 field. In stepping through the macro it
shows each line as being False. Even when the value is "Yes".
in Flag1 (Project Pro 2003)
Dim T As Task
For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
If T.Flag1 = True Then
T.Delete
End If
End If
Next T
However, when the macro is executed, nothing is deleted. Now this sub
routine is being called in a Master project where the links to the
subprojects have been broken in a previous subroutine. It appears to be
ignoring the value in the Flag1 field. In stepping through the macro it
shows each line as being False. Even when the value is "Yes".