Project Developer Reference |
|
Returns or sets the cost per use of a resource. Read/write Variant.
Syntax
expression.CostPerUse
expression A variable that represents a PayRate object.
Return Value
Variant
Example
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.<strong class="bterm">CostPerUse</strong>
Next R
' Display the total cost per use.
MsgBox ("Sum of the cost per use of each resource in this project: " & TotalCostPerUse)
End Sub
|
See Also