Task.TaskDependencies property (Project)

Gets a TaskDependencies collection of dependent (predecessor and successor) tasks. Read-only TaskDependencies.

Syntax

expression. TaskDependencies

expression A variable that represents a Task object.

Remarks

Each TaskDependency object in the TaskDependencies collection includes the link type and link lag information between the tasks.

Example

The following example examines each predecessor for the specified task and displays a message for each predecessor task that has a priority higher than "Medium."

Sub FindHighPriPreds() 
 Dim TaskDep As TaskDependency 
 
 For Each TaskDep In ActiveProject.Tasks("Write Requirements Brief").TaskDependencies 
 If TaskDep.From.Priority > 500 Then 
 MsgBox "Task #" & TaskDep.From.ID & " (" & TaskDep.From.Name & ") " & _ 
 "has a priority higher than medium." 
 End If 
 Next TaskDep 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.