Application.LinkTasksEdit Method
Project Developer Reference |
Edits task dependencies (links).
Syntax
expression.LinkTasksEdit(From, To, Delete, Type, Lag, PredecessorProjectName, SuccessorProjectName)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
From | Required | Long | Long. The identification number of a predecessor task. |
To | Required | Long | Long. The identification number of a successor task. |
Delete | Optional | Boolean | True if Microsoft Office Project 2007 deletes the referenced link. The default value is False. |
Type | Optional | Long | The relationship between tasks that become linked. Can be one of the PjTaskLinkType constants. The default value is pjFinishToStart. |
Lag | Optional | Variant | The duration between linked tasks in default units. To specify lead time between tasks, use a negative value. |
PredecessorProjectName | Optional | String | The name of the subproject in a consolidated project that contains the task identified with From. If PredecessorProjectName is omitted, the current project is assumed. |
SuccessorProjectName | Optional | String | The name of the subproject in a consolidated project that contains the task identified with To. If SuccessorProjectName is omitted, the current project is assumed. |
Return Value
Boolean
Example
The following example prompts the user for a range of task identification numbers, and then links the tasks in the range from finish to start. This example assumes the ID range is valid, as well as the absence of any duplicate tasks, null tasks, consolidated projects, and so on.
Visual Basic for Applications |
---|
|
See Also