PayRate Object, PayRates Collection Object
Multiple objects PayRates PayRate |
Represents a line of rates from a resource's cost rate table. The PayRate object is a member of the PayRates collection.
Using the PayRate Object
Use PayRates(Index), where Index is the pay rate index number or date for which to return the rates in effect, to return a single PayRate object. The following example returns the standard pay rate for Tamara's first row of rates in cost rate table C.
ActiveProject.Resources("Tamara").CostRateTables("C").PayRates(1).StandardRate
Using the PayRates Collection
Use the PayRates property to return a PayRates 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
Use the Add method to add a PayRate object to the PayRates collection. The following example adds a line to Tamara's cost rate table "C," with an Effective Date date of 12/1/96, a standard rate of $25.00/h, and overtime rate of $40.00/h and a per use cost of $0.
ActiveProject.Resources("Tamara").CostRateTables("C").PayRates.Add "12/1/96", "$25/h", "$40/h", "$0"
Properties | Application Property | CostPerUse Property | Count Property | EffectiveDate Property | Index Property | Item Property | OvertimeRate Property | Parent Property | StandardRate Property
Methods | Add Method | Delete Method
Parent Objects | CostRateTable Object, CostRateTables Collection Object | Resource Object, Resources Collection Object
Child Objects
See Also | PayRates Property