Application.HighlightPredecessors Method (Project)

Sets or clears task predecessor highlighting for the task path feature.


expression. HighlightPredecessors (Set)

expression A variable that represents an Application object.


Name Required/Optional Data type Description
Set Optional Variant True to set task predecessor highlighting; False to clear the task predecessor highlighting.
Set Optional VARIANT
Name Required/Optional Data type Description

Return value



The HighlightPredecessors method corresponds to the ** Predecessors** item in the Task Path drop-down list, on the FORMAT tab, under GANTT CHART TOOLS on the ribbon.


Create a project where task 2 is a predecessor of task 3, and then run the following statements in the Immediate window of the VBE. The PathPredecessor statement prints True.

Application.SelectRow Row:=2, RowRelative:=False 
Application.HighlightPredecessors True
? ActiveProject.Tasks(3).PathPredecessor

See also

Application Object

Task.PathPredecessor Property