CostRateTable Object, CostRateTables Collection Object

Multiple objects
CostRateTables
CostRateTable
PayRates

Represents a collection of pay rates for a resource. The CostRateTable object is a member of the CostRateTables collection.

Using the CostRateTable Object

Use CostRateTables(Index), where Index is the cost rate table index number or cost rate table name, to return a single CostRateTable object. The following example changes the standard rate on one of a resource's pay rate tables.

Dim GovtRates As CostRateTable

Set GovtRates = ActiveProject.Resources("Bob").CostRateTables("B")
GovtRates.PayRates(1).StandardRate = "$10/h"

Using the CostRateTables Collection

Use the CostRateTables property to return a CostRateTables collection. The following example lists the standard pay rates for all the cost rate tables of the resource in the active cell.

Dim CRT As CostRateTable, PR As PayRate
Dim Rates As String

For Each CRT In ActiveCell.Resource.CostRateTables
    For Each PR In CRT.PayRates
        Rates = Rates & "CostRateTable " & CRT.Name & ": " & PR.StandardRate & vbCrLf
    Next PR
Next CRT
    
MsgBox Rates

Properties | Application Property | Count Property | Index Property | Item Property | Name Property | Parent Property | PayRates Property

Parent Objects | Assignment Object, Assignments Collection Object | Resource Object, Resources Collection Object

Child Objects | PayRate Object, PayRates Collection Object

See Also | CostRateTable Property | CostRateTables Property