Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.19 KB

Project.Task.ActualOvertimeCost.md

File metadata and controls

53 lines (37 loc) · 1.19 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Task.ActualOvertimeCost property (Project)
project-server
Project.Task.ActualOvertimeCost
7e3b409e-3249-4fe1-b5a1-1b65646519b3
06/08/2017
medium

Task.ActualOvertimeCost property (Project)

Gets the actual overtime cost for a task. Read-only Variant.

Syntax

expression. ActualOvertimeCost

expression A variable that represents a Task object.

Example

The following example shows 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

[!includeSupport and feedback]