Application.HighlightDrivingPredecessors method (Project)

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

Syntax

expression. HighlightDrivingPredecessors (Set)

expression A variable that represents an Application object.

Parameters

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

Return value

Boolean

Remarks

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

Example

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

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

See also

Application Object

Task.PathDrivingPredecessor Property

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.