J
JoJa15
I am trying to find the latest finish date for a group of tasks
assigned to a certain resource and then to link that task to another
one as a predecessor.
So for example say I had a task called "Example"
I want to scan through all tasks in a project plan that belong to
person "A", find the one that has the latest finish date, and then link
that task to "Example" as a predeccesor.
I am assuming I would structure it this way:
(1) In a for loop, loop through all active tasks in the project.
(2) If current task in loop has resource = "a" then assign variable
Finish to finish date of that task.
(3) If Finish is greater then Final_Finish variable assign Finish to
Final Finish and assign ID of task to Final_Finish_ID.
(4) Keep looping.
(5) Assign Final_Finish_ID to the Predeccesor field of task "Example"
Ideally I would like to do this for each resource in the project so I
am assuming that I would have the above loop inside of another loop
that goes through each resource in the project. The "Example" task
would actually be a task with the person's name.
Is the above the easiest way to accomplish what i am trying to achieve
or is there an easier way? I have never programmed Project VBA so it
might take me a little while to figure out the language.
- John
assigned to a certain resource and then to link that task to another
one as a predecessor.
So for example say I had a task called "Example"
I want to scan through all tasks in a project plan that belong to
person "A", find the one that has the latest finish date, and then link
that task to "Example" as a predeccesor.
I am assuming I would structure it this way:
(1) In a for loop, loop through all active tasks in the project.
(2) If current task in loop has resource = "a" then assign variable
Finish to finish date of that task.
(3) If Finish is greater then Final_Finish variable assign Finish to
Final Finish and assign ID of task to Final_Finish_ID.
(4) Keep looping.
(5) Assign Final_Finish_ID to the Predeccesor field of task "Example"
Ideally I would like to do this for each resource in the project so I
am assuming that I would have the above loop inside of another loop
that goes through each resource in the project. The "Example" task
would actually be a task with the person's name.
Is the above the easiest way to accomplish what i am trying to achieve
or is there an easier way? I have never programmed Project VBA so it
might take me a little while to figure out the language.
- John