How to find Resource start and end date from VBA

S

Satya

I am not able to find the resource start and end dates so that I can use them
to get values from the timescale method
 
J

John

Satya said:
I am not able to find the resource start and end dates so that I can use them
to get values from the timescale method

Satya,
The syntax construct is the following:
ActiveProject.Tasks(index).Assignments(index).Start
and
ActiveProject.Tasks(index).Assignments(index).Finish

Normally this type of information is retrieved in a loop that looks at
all tasks and all assignments for those tasks. However for individual
tasks, use the Task ID as the index for the tasks object and the
assignment index is the first, second, third, etc. assignment for the
task.

John
Project MVP
 
S

Satya

Hi John

Thanks for the answer.
I had thought of this possibility of looping through the assignments and
finding the lowest and the highest date for the resource but in msproject if
we view->resource usage->insert columns add resource start date and end date
we get the values directly. Is it possible to get those values directly
through VBA.

Thanks once again.
 
J

John

Satya said:
Hi John

Thanks for the answer.
I had thought of this possibility of looping through the assignments and
finding the lowest and the highest date for the resource but in msproject if
we view->resource usage->insert columns add resource start date and end date
we get the values directly. Is it possible to get those values directly
through VBA.

Thanks once again.

Satya,
I must be missing something. I already gave you the syntax to get the
information you desire through VBA. What exactly is your end goal? If I
understood that, then I could probably provide more help.

John
Project MVP
 
S

Satya

Actually I wanted the resource start date & end date directly so that when i
traverse the resource.timescale(start date, end date,,,,) the loop will be
shortel if I directly get the resource start date and end date.
Otherwise I have to loop through all the resource assignments and then get
the resource start date and end date which will increase the processing time.
Also I cannot give project start date and end date because the resource might
have started work before that and anyway the loop would be very long.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top