none
Changing Resoruce Cost Rates RRS feed

  • Question

  • Greetings!   Does anyone know of a down and dirty quick way to change the Standard Rate for all the resources in the ERP.   Here is the kicker, the old rate must remain for tasks before a certain date and the new rate for tasks after that date.     I know I can go to the cost tab in each resource profile and make the change with an effective date. as shown below.  Is this the only way?    Trying to avoid doing one at a time (but sadly I think I know the answer)

    Thanks!  ~Randy

     

    Thursday, August 30, 2012 8:42 PM

Answers

All replies

  • Randy --
     
    The slow way is to do by hand what you are describing by setting a new Standard Rate on the effective date, one resource at a time.  The fast way would be to use VBA code for this purpose.  So, I would suggest you repost your question in the Project Customization and Programming user forum at:
     
     
    In that forum, ask our VBA gurus for their guidance on the VBA code needed to quickly accomplish your goal.  Hope this helps.
     

    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

    Friday, August 31, 2012 12:02 AM
    Moderator
  • Dale's correct as always.  Recommend you continue this discussion on the
    DEV forum, but to get you started, here's some code I wrote to do something
    similar.  Since I had it lying around, figured I'd post it. 
     
    Note that I think you just need to add a parameter on the entry to set the
    Effective Date for the cost....this just blanks everything out and then adds
    a new row.
     
    Sub ResourceCRTChange()
        'This macro is intended for administrative use only.
       'This macro will erase any costs associated with resources, and then
       'set the default rate for Cost Rate Table A as $10,000.  Use this to
    quickly modify the rates on the resource pool.
        Dim R As Resource
       Dim CRT As CostRateTable
       Dim PR As PayRate
      
       For Each R In ActiveProject.Resources
          
           'Zero out any standard rates already set in all cost rate tables
          
           For Each CRT In R.CostRateTables
               For Each PR In CRT.PayRates
                   PR.StandardRate = 0
               Next PR
           Next CRT
          
           'Set the standard rate for Table A to 10000
          
           If R.Type = pjResourceTypeMaterial Then
               R.CostRateTables("A").PayRates(1).StandardRate = 10000
           End If
          
       Next R
    End Sub
     
     

    Andrew Lavinsky [MVP] Blog: http://azlav.umtblog.com Twitter: @alavinsky
    Friday, August 31, 2012 2:07 AM
    Moderator
  • See my comments under Andrew's post.....

    ~RK

    Friday, August 31, 2012 6:49 PM
  • Thanks Dale & Andrew.   If I am reading this correctly, a VBA script can be used to accomplish this.    We received an updated rate table based on Primary Role (which is a custom resource enterprise code).    Since there are approximately 90 Roles - each with a different rate, and all the rates changed, we would likely need that many lines of VBA script to change the rates for all users (effective on a certain date, of course).

    Sounds like a programming headache (but that is coming from someone who is not a programmer).    I'll hit the VBA forum up and see what they say.

    Again - Thanks!

    Friday, August 31, 2012 6:52 PM
  • Well, you could just have it read the values from an Excel worksheet - which
    would speed up the process, but at that point, you may as well do it manually,
    I suppose.
     
     

    Andrew Lavinsky [MVP] Blog: http://azlav.umtblog.com Twitter: @alavinsky
    Saturday, September 1, 2012 6:19 PM
    Moderator