Resource.CostPerUse 屬性 (Project)
取得或設定每次使用資源成本。 讀取/寫入 Variant 。
語法
expression。 CostPerUse
表達 代表 Resource 物件的變數。
範例
下面範例顯示使用中專案每次使用每個資源的成本總和。
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
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。