Table of contents
TOC
Collapse the table of content
Expand the table of content

Assignment.StartVariance Property (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets the variance (in minutes) between the baseline start date and the start date of the assignment. Read-only Variant.

Syntax

expression. StartVariance

expression A variable that represents an Assignment object.

Example

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

Sub CountLateAssignments() 

 Dim a As Assignment 
 Dim t As Task 
 Dim numLateAssignments As Long 
 Dim lateAssignments As String 
 Dim daysLate As Single 

 numLateAssignments = 0 

 ' Look for late tasks in the active project. 
 For Each t In ActiveProject.Tasks 
 For Each a In t.Assignments 
 If a.BaselineStart < ActiveProject.CurrentDate And a.StartVariance > 0 Then 
 numLateAssignments = numLateAssignments + 1 
 daysLate = Round(a.StartVariance / 1440, 1) 
 lateAssignments = lateAssignments &; vbCrLf &; vbTab &; t.Name _ 
 &; ": resource " &; a.Resource.Name &; ": " &; daysLate &; " days" 
 End If 
 Next a 
 Next t 

 MsgBox "There are " &; numLateAssignments &; " late assignments in this project: " &; lateAssignments 

End Sub
© 2018 Microsoft