title | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | |
---|---|---|---|---|---|---|
Resource.CostPerUse property (Project) |
project-server |
|
171217c9-200b-8cd1-b985-aa1aed099d0e |
06/08/2017 |
medium |
Gets or sets the cost per use of a resource. Read/write Variant.
expression. CostPerUse
expression A variable that represents a Resource object.
The following example displays the sum of the cost per use of each resource in the active project.
Sub TotalCostPerUse()
Dim R As Resource ' Resource object used in For Each loop
Dim TotalCostPerUse As Double ' The total cost per use
' Add up the cost per use of each resource.
For Each R In ActiveProject.Resources
TotalCostPerUse = TotalCostPerUse + R.CostPerUse
Next R
' Display the total cost per use.
MsgBox ("Sum of the cost per use of each resource in this project: " & TotalCostPerUse)
End Sub
[!includeSupport and feedback]