MS Project - Mehrjährige Inflation

Ich leite ein 3-Jahres-Projekt in einem Land, in dem die durchschnittliche jährliche Inflationsrate 12 % beträgt. Anstatt jeden Artikel durchzugehen und für jeden Artikel „+12 %“ in die Kostensatztabelle einzutragen, gibt es eine Möglichkeit, den Satz automatisch für alle Ressourcen über die 3 Jahre in MS Project Professional 2016 zu erhöhen?

Antworten (1)

Der einfachste und wiederholbarste Weg, dies zu tun, ist eine Makro/VBA-Prozedur. Hier ist ein Code, den John - Project vor einigen Jahren erstellt und auf msdn geteilt hat ( VBA Macro Help - Cost Rate Tables ).

Option Text vergleichen

Unter NOVA_Rates()

Dim r als Ressource

Für jedes r in ActiveProject.Resources

'jump around blank lines on Resource Sheet

If Not r Is Nothing Then

    'only do this if resource is labor type

    If r.Type = pjResourceTypeWork Then

        'first clear all pay rate data

        'Note: this is necessary if the macro is run a 2nd time with

        'the same data. Additional code is necessary to add new data

        'to existing pay rate tables and clearing may not be necessary.

        For i = 1 To 5

            'cycle through each of the 5 rate tables

            Set pr = r.CostRateTables(i).PayRates

            pr(1).StandardRate = 0

            pr(1).OvertimeRate = 0

            pr(1).CostPerUse = 0

            'clearing must be done in reverse order

            If pr.Count > 1 Then

                For j = pr.Count To 2 Step -1

                    pr(j).Delete

                Next j

            End If

        Next i

        'set new object for "B" table only

        Set pr = r.CostRateTables("B").PayRates

        'add new rate data based on Resource Text1 field

        If InStr(1, r.Text1, "Proj") > 0 Then

            pr.Add "7/2/2011", "$1/h", "$5/h", "$0"

        ElseIf InStr(1, r.Text1, "elec") > 0 Then

            pr.Add "7/2/2011", "$2/h", "$6/h", "$0"

        ElseIf InStr(1, r.Text1, "mech") > 0 Then

            pr.Add "7/2/2011", "$3/h", "$7/h", "$0"

        End If

    End If

End If

Nächster

End Sub

Alles unterhalb des Hyperlinks gehört zusammen in einem einzigen Modul in project vba. Ich weiß nicht, wie ich das hier kontrollieren soll.