Task.LinkPredecessors Method
Project Developer Reference |
Adds predecessors to a task.
Syntax
expression.LinkPredecessors(Tasks, Link, Lag)
expression A variable that represents a Task object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Tasks | Required | Object | The Task or Tasks object specified becomes a predecessor of the task specified with expression. |
Link | Optional | Long | A constant that specifies the relationship between tasks that become linked. Can be one of the PjTaskLinkType constants. The default value is pjFinishToStart. |
Lag | Optional | Variant | A string that specifies the duration of lag time between linked tasks. To specify lead time between tasks, use an expression for Lag that evaluates to a negative value. |
Example
The following example prompts the user for the name of a task and then makes the task a predecessor of the selected tasks.
Visual Basic for Applications |
---|
|
See Also