D
DGD
I have a project based upon services rates that covers a period of 6
years. I have created labour rates and adjusted them by 3%/year over
the base rate, starting at the start of every new calendar year. I
also have a macro that calculates in a cost field the costs associated
with resources identified as "work" and another macro that does the
same thing for resources identified as material. The problem I am
having is that the macro only uses the standard rate for all years of
the project and does not use the inflated rates for any year beyond
year one for both "work" and "material" resources. The loop in the
"work" macro is as follows:
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
t.Cost4 = 0
For Each a In t.Assignments
If a.ResourceType = pjResourceTypeWork Then
RRate =
Mid(ActiveProject.Resources(a.ResourceID).StandardRate, 2,
Len(ActiveProject.Resources(a.ResourceID).StandardRate) - 4)
t.Cost4 = t.Cost4 + a.Work / 60 * RRate
End If
Next a
End If
Next t
To me the offending line is the "RRate =............." because it only
uses one rate for the entire project. How would I get it to look at
rates associated with year 2, year 3, year 4 etc, as opposed to only
the rate associated with year 1? Any help appreciated.
Doug
years. I have created labour rates and adjusted them by 3%/year over
the base rate, starting at the start of every new calendar year. I
also have a macro that calculates in a cost field the costs associated
with resources identified as "work" and another macro that does the
same thing for resources identified as material. The problem I am
having is that the macro only uses the standard rate for all years of
the project and does not use the inflated rates for any year beyond
year one for both "work" and "material" resources. The loop in the
"work" macro is as follows:
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
t.Cost4 = 0
For Each a In t.Assignments
If a.ResourceType = pjResourceTypeWork Then
RRate =
Mid(ActiveProject.Resources(a.ResourceID).StandardRate, 2,
Len(ActiveProject.Resources(a.ResourceID).StandardRate) - 4)
t.Cost4 = t.Cost4 + a.Work / 60 * RRate
End If
Next a
End If
Next t
To me the offending line is the "RRate =............." because it only
uses one rate for the entire project. How would I get it to look at
rates associated with year 2, year 3, year 4 etc, as opposed to only
the rate associated with year 1? Any help appreciated.
Doug