none
Remove Rates from Cost Rate Tables A through E RRS feed

  • Question

  • We currently are using MS Project 2010 Server that has over 500 resource codes that utilize Cost Rate Tables A though E for different contract types. Before we allow any of our people to use a schedule with any rate structure built in, we need to remove the costs associated with different years that we have populated in the Cost Rate Table after the schedule has been removed from the server environment. Is there a way to access the Cost Rate Table to manually remove rates from all 500+ resources for each year and on each Coast Rate Tab (A through E)? Is there a code that can be written, as we have tried to write VBA to "open the Cost Rate Table" and remove the rates from any of the tabs, but the VBA will not pick up on an open window (i.e. resource information from a double click on the resource in the Resource Usage View)?

    Thank you, 

    Mike 

     
    Friday, February 17, 2017 4:16 PM

All replies

  • Mike,

    Years ago I wrote a macro to escalate resource rates based on increases from resource annual merit reviews. Part of the procedure included a utility to clear all resource rates. Here is that utility. Perhaps it will help.

    John

    'This is a special utility macro for completely purging pay rate data from a file
    '   -- USE WITH CAUTION --
    Sub PurgeRateTables()
    Dim ans As Variant

    ans = MsgBox("                       C A U T I O N !" & Chr(13) & Chr(13) & _
        "This procedure will completely purge all pay rate" & Chr(13) & _
        "information including, Std. Rate, Ovt. Rate, and" & Chr(13) & _
        "Cost/Use from pay rate tables in this file" & Chr(13) & Chr(13) & _
        "Proceed?", vbYesNo + vbExclamation + vbDefaultButton2, "Resource Rate Escalator Utility")
    If ans = vbNo Then Exit Sub
    For Each R In ActiveProject.Resources
        If Not R Is Nothing Then
            For i = 1 To 5
                Set pr = R.CostRateTables(i).PayRates
                pr(1).StandardRate = 0
                pr(1).OvertimeRate = 0
                pr(1).CostPerUse = 0
                If pr.Count > 1 Then
                    For j = pr.Count To 2 Step -1
                        pr(j).Delete
                    Next j
                End If
            Next i
        End If
    Next R
    MsgBox "Pay rate information has been purged from this file", vbOKOnly, "Resource Rate Escalator Utility"
    End Sub

    Friday, February 17, 2017 4:59 PM
  • Thanks John!

    I will give this a shot next week.

    Sunday, February 26, 2017 7:49 PM
  • Mike,

    You're welcome and thanks for the feedback. Let me know it it does what you need.

    John

    Sunday, February 26, 2017 10:17 PM