Application.HighlightPredecessors method (Project)
Sets or clears task predecessor highlighting for the task path feature.
Syntax
expression. HighlightPredecessors
(Set)
expression A variable that represents an Application object.
Parameters
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
Boolean
Remarks
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.
Example
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
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.