TaskDependencies.Add method (Project)

Adds a TaskDependency object to a TaskDependencies collection.

Syntax

expression.Add (From, Type, Lag)

expression A variable that represents a 'TaskDependencies' object.

Parameters

Name Required/Optional Data type Description
From Required Object The Task object specified becomes a predecessor of the task specified by expression.
Type Optional Long The type of relationship between the linked tasks. Can be one of the PjTaskLinkType constants. The default value is pjFinishToStart.
Lag Optional Variant The duration of lag time between linked tasks. To specify lead time between tasks, use a negative value. String values default to days unless otherwise specified. Non-string values are interpreted as minutes. The default value is 0.

Return value

TaskDependency

See also

TaskDependencies Collection Object

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.