Assignment.StartVariance Property

Project Developer Reference

Returns the variance (in minutes) between the baseline start date and the start date of an assignment or task. Read-only Variant.

Syntax

expression.StartVariance

expression   A variable that represents an Assignment object.

Return Value
Variant

Example
The following example displays the number of tasks in the active project that have started late.

Visual Basic for Applications
  Sub CountLateTasks()
Dim T As Task               ' Task object used in For Each loop
Dim LateTasks As Integer    ' The number of late tasks

LateTasks = 0

' Look for late tasks in the active project.
For Each T In ActiveProject.Tasks
    If T.BaselineStart &lt; ActiveProject.CurrentDate And T.<strong class="bterm">StartVariance</strong> &gt; 0 Then
        LateTasks = LateTasks + 1
    End If
Next T

MsgBox "There are " &amp; LateTasks &amp; " late tasks in this project."

End Sub

See Also