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

Project.SpreadPercentCompleteToStatusDate 属性 (项目)Project.SpreadPercentCompleteToStatusDate Property (Project)

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

如此如果对总任务完成百分比的编辑扩展到状态日期或当前日期当状态日期是"NA"。如果编辑扩展到计算的终止日期的任务。读/写boolean 类型的值True if edits to total task percent complete are spread to the status date, or to the current date if the status date is "NA". False if edits are spread to the calculated stop date of the task. Read/write Boolean.

语法Syntax

表达式SpreadPercentCompleteToStatusDateexpression. SpreadPercentCompleteToStatusDate

表达式_一个表示项目对象的变量。_expression A variable that represents a Project object.

示例Example

以下示例将检查活动项目的状态日期。如果该状态日期一直使用默认值,而对任务总完成百分比的编辑扩展到了状态日期,则宏将询问要使用的状态日期。如果对任务总完成百分比的编辑扩展到了计算出的任务停止日期,则宏将询问用户是否应将这些编辑扩展到状态日期,如果是,则询问要使用的状态日期。The following example checks the status date of the active project. If it has never changed from the default, but edits to total task percent complete are spread to the status date, the macro asks for a status date to use. If edits to total task percent complete are spread to the calculated stop date of the task, the macro asks the user if edits should be spread to a status date instead and, if so, asks for a status date to use.

Sub SpreadPercentComplete() 
 Dim NewStatus As Date, AskToSpread As Long 

 With ActiveProject 
 If .StatusDate = "NA" And .SpreadPercentCompleteToStatusDate Then 
 NewStatus = InputBox("Enter a status date for the project: ") 
 .StatusDate = NewStatus 
 MsgBox "The status date was set to " &; .StatusDate &; "." 
 ElseIf .SpreadPercentCompleteToStatusDate = False Then 
 AskToSpread = MsgBox("Should changes to total task percent complete" &; _ 
 " be spread to a status date?", vbYesNo) 
 If AskToSpread = vbYes Then 
 NewStatus = InputBox("Enter a status date for the project: ") 
 .StatusDate = NewStatus 
 .SpreadPercentCompleteToStatusDate = True 
 MsgBox "The status date was set to " &; .StatusDate &; "." 
 End If 
 End If 
 End With 

End Sub
© 2018 Microsoft