Table of contents
TOC
折叠目录
展开目录

Application.HighlightPredecessors 方法 (项目)Application.HighlightPredecessors Method (Project)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

设置或清除任务的前置任务的任务路径功能突出显示。Sets or clears task predecessor highlighting for the task path feature.

语法Syntax

表达式HighlightPredecessors(设置)expression. HighlightPredecessors(Set)

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
设置Set可选OptionalVariantVariant要设置任务的前置任务突出显示;以清除突出显示任务前置任务。True to set task predecessor highlighting; False to clear the task predecessor highlighting.
设置Set可选Optional变量VARIANT
名称Name必需/可选Required/Optional数据类型Data type说明Description

返回值Return value

BooleanBoolean

注解Remarks

HighlightPredecessors方法对应于 * * 中任务路径下拉列表的格式选项卡上的在功能区上的甘特条形图工具项前置任务 * 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

创建的项目任务 2 所在任务 3,然后在 VBE即时窗口中运行以下语句。PathPredecessor语句打印,则返回 TrueCreate 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

概念Concepts

Application 对象Application Object

其他资源Other resources

Task.PathPredecessor 属性Task.PathPredecessor Property

© 2018 Microsoft