Freigeben über


Project.StatusDate property (Project)

Ruft ab oder legt das aktuelle Statusdatum für das Projekt. Wenn kein Statusdatum vorhanden ist, gibt "NV" zurück. Variant mit Lese-/Schreibzugriff.

Syntax

Ausdruck. StatusDate

Ausdruck Eine Variable, die ein Project-Objekt darstellt.

Beispiel

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, it asks for a status date to use. Wenn Änderungen an der Gesamtanzahl des Vorgangs in Prozent abgeschlossen auf das berechnete Beendigungsdatum des Vorgangs verteilt werden, wird der Benutzer gefragt, ob die Bearbeitungen stattdessen auf ein Statusdatum verteilt werden sollen, und wenn ja, wird nach einem Statusdatum gefragt, das verwendet werden soll.

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

Support und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.