Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.06 KB

Project.Resource.CostPerUse.md

File metadata and controls

46 lines (29 loc) · 1.06 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Resource.CostPerUse property (Project)
project-server
Project.Resource.CostPerUse
171217c9-200b-8cd1-b985-aa1aed099d0e
06/08/2017
medium

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

[!includeSupport and feedback]