Application.TimelineBarDateRange 方法 (Project)Application.TimelineBarDateRange method (Project)

修改时间线条形图的开始日期和完成日期。Modifies the start and finish dates for a Timeline bar. 在 Office 2016 中引入。Introduced in Office 2016.

语法Syntax

expressionexpression. TimelineBarDateRange( CustomDates、开始_日期_、 FinishDateBarIndex)TimelineBarDateRange( CustomDates, StartDate, FinishDate, BarIndex)

_表达式_一个代表Application对象的变量。expression A variable that represents a Application object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
CustomDatesCustomDates 可选Optional BooleanBoolean 指示日程表条形图是否应使用自定义日期。Indicates if the timeline bar should use custom dates. 如果为 true, 且未指定开始和结束值, 则使用当前项目的开始日期和完成日期。If true, and the start and finish values are not specified, uses the current project's start and finish dates. 如果为 false, 则忽略任何其他值。If false, ignores any of the other values.
StartValueStartValue 可选Optional VariantVariant 开始日期。Start date.
FinishValueFinishValue 可选Optional VariantVariant 完成日期。Finish date.
TimelineViewNameTimelineViewName 可选Optional StringString 指定要使用的日程表的名称。Specifies the name of a timeline to use. 名称可以是内置时间线, 也可以是现有的自定义时间线, 如 "我的时间线"。The name can be the built-in timeline or an existing custom timeline such as "My Timeline". 默认值为活动日程表的名称。The default value is the name of the active timeline.

返回值Return value

布尔BOOLEAN

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.