Szerkesztés

Megosztás a következőn keresztül:


Resource.CostPerUse property (Project)

Gets or sets the cost per use of a resource. Read/write Variant.

Syntax

expression. CostPerUse

expression A variable that represents a Resource object.

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.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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.