Task.PreleveledFinish property (Project)
Gets the finish date of a task before leveling occurred. Read-only Variant.
Syntax
expression. PreleveledFinish
expression A variable that represents a Task object.
Example
The following example calculates the difference, if any, between the projected finish date and the projected finish date before the task was leveled for each task in the project, and then displays those that changed.
Sub DateDifferences()
Dim T As Task, Results As String
For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
' Tasks that have never been leveled return "NA"
If T.PreleveledFinish <> "NA" And T.Finish <> T.PreleveledFinish Then
Results = Results & T.Name & ": " & _
DateDiff("d", T.PreleveledFinish, T.Finish) & _
" days" & vbCrLf
End If
End If
Next T
If Results <> "" Then MsgBox Results
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.