C
CQ
I am not good at VBA and I am trying to get a listing of all the resources
assigned to a task. THEN, I want to take each resource, multiply work hours
by resource by a custom rate field and sum that up for all the resources so
that I have the total cost by task - putting the result into a custom field.
I think I am as far as getting the assignments...
Here is what I have thus far (which is failing miserably):
Dim ts As Tasks
Dim t As Task
Dim res As Resource
Dim agn As Assignment
Set ts = ActiveProject.Tasks
For Each t In ts
If Not t Is Nothing Then
For Each res In ActiveProject.Resources
If Not res Is Nothing Then
For Each agn In ts.Assignments
End If
End If
Next t
assigned to a task. THEN, I want to take each resource, multiply work hours
by resource by a custom rate field and sum that up for all the resources so
that I have the total cost by task - putting the result into a custom field.
I think I am as far as getting the assignments...
Here is what I have thus far (which is failing miserably):
Dim ts As Tasks
Dim t As Task
Dim res As Resource
Dim agn As Assignment
Set ts = ActiveProject.Tasks
For Each t In ts
If Not t Is Nothing Then
For Each res In ActiveProject.Resources
If Not res Is Nothing Then
For Each agn In ts.Assignments
End If
End If
Next t