Share via


ActualOvertimeWork Property

Returns the actual overtime work (in minutes) for an assignment, resource, or task. Read/write for the Assignment object. Read-only Variant.

Remarks

The ActualOvertimeWork property does not return any meaningful information for material resources. Setting a value returns a trappable error (error code 1101) when applied to material resources.

Example

The following example illustrates the cost of overtime by calculating the total cost of tasks with overtime work, as well as breaking down the individual costs per task.

Sub PriceOfOvertime()
    Dim T As Task
    Dim Price As Variant, Breakdown As String
    
    For Each T In ActiveProject.Tasks
        If Not (T Is Nothing) Then
            If T.ActualOvertimeWork <> 0 Then
                Price = Price + T.ActualOvertimeCost
                Breakdown = Breakdown & T.Name & ": " & _
                    ActiveProject.CurrencySymbol & _
                    T.ActualOvertimeCost & vbCrLf
            End If
        End If
    Next T
    
    If Breakdown <> "" Then
        MsgBox Breakdown & vbCrLf & "Total: " & _
            ActiveProject.CurrencySymbol & Price
    End If

End Sub

Applies to | Assignment Object, Assignments Collection Object | Resource Object, Resources Collection Object | Task Object, Tasks Collection Object

See Also | ActualCost Property | ActualDuration Property | ActualFinish Property | ActualOvertimeCost Property | ActualStart Property | ActualWork Property | BaselinenCost Property | Costn Property | CostVariance Property | FixedCost Property | RemainingCost Property