Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.94 KB

Project.Project.SpreadPercentCompleteToStatusDate.md

File metadata and controls

53 lines (38 loc) · 1.94 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Project.SpreadPercentCompleteToStatusDate property (Project)
project-server
Project.Project.SpreadPercentCompleteToStatusDate
c1c9a8eb-8572-7bad-33b2-23157c908f60
06/08/2017
medium

Project.SpreadPercentCompleteToStatusDate property (Project)

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

expression. 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

[!includeSupport and feedback]