Question Locked

MSProject - Modify a constraint on a taks

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I want to change a constraint on a task from "Finish Earlier than" to "Start No Earlier Than".

I have the code, it's executed without error, but it doesnt change anything.

Is it a bug, possible, or my code is just wrong?

Thank you for answering,

I tried to do it of two different way:

Dim oTask As Task
For Each oTask In ActiveProject.Tasks
SetTaskField Field:="ConstraintType",Value:="Start No Earlier Than",allSelectedTasks:=False

SetTaskField Field:="Constraint Date", Value:=oTask.Start, AllSelectedTasks:=False
Next

OR

Dim iRow As Integer
For iRow = 1 To ActiveProject.Tasks.Count
SelectRow Row:=iRow
SetTaskField Field:="Constraint Type", value:="Start No Earlier Than", AllSelectedTasks:=False

SetTaskField Field:="Constraint Date", Value:=ActiveProject.Tasks.Item(iRow).Start, AllSelectedTasks:=False
Next

1 reply

by Former member

Clarifications

This discussion is closed to new replies.