Determine date of last actual work

N

Nkiefer

I have a vba routine that creates an email for all unfinished tasks by
resource from our shared resource file. I am able to show each user the
project, task, remaining work, start and finish dates.

Since these are unfinished tasks (ActualFinish = "NA") is it possible to
also determine the last date that work was done on a task? Since I know they
have not finished the task, I would like to tell them the last time they
worked on that task.
 
J

Jan De Messemaeker

Hi,

There are two task fields
Stop (last recorded actual work)
Resume(when first unfinished work planned)
They only differ in case of a split
They read NA when actual start is NA
HTH
 
J

John

Nkiefer said:
I have a vba routine that creates an email for all unfinished tasks by
resource from our shared resource file. I am able to show each user the
project, task, remaining work, start and finish dates.

Since these are unfinished tasks (ActualFinish = "NA") is it possible to
also determine the last date that work was done on a task? Since I know they
have not finished the task, I would like to tell them the last time they
worked on that task.

Mkiefer,
It sounds like you VBA macro gathers some static fields from Project to
populate the e-mail. All you need to do is add a loop to look at the
timescaled data for Actual Work. Look up the TimescaleData Method in the
VBA help file for the syntax. Since your e-mail is resource based, you
might want to loop on resources and pull out the
pjAssignmentTimescaledActualWork value. I also suggest you may want to
loop through the whole span of data from assignment start to finish in
case there was a span of time when no work was logged. Then just capture
the last date with non-zero data.

Hope this helps.
John
Project MVP
 
N

Nkiefer

Thanks John that worked. I understand that using TimescaleData for a
resource gives me the work done by that resource and I assume if it did it by
task I would get the total of all resources worked on a specific task.

But where would you use it on an assignment?

Thanks again!
 
J

John

Nkiefer said:
Thanks John that worked. I understand that using TimescaleData for a
resource gives me the work done by that resource and I assume if it did it by
task I would get the total of all resources worked on a specific task.

But where would you use it on an assignment?

Thanks again!
Mkiefer,
Assignments in Project are probably the most difficult for users to
understand. From a task standpoint, the assignments are the resources
(assigned). From a resource standpoint, the assignments are the tasks
(assigned). In other words, assignments are the bridge between tasks and
resources.

If VBA loops through all resources in a file this basic structure will
give the assignments of those resources:
For Each r In ActiveProject.Resources
For Each a in R.Assignments
[your code here]
Next a
Next r

If VBA loops through all tasks in a file this basic structure will give
the assignments of those tasks:
For Each t In ActiveProject.Tasks
If Not t is Nothing Then 'this jumps around blank task lines
For Each a in t.Assignments
[your code here]
Next a
End If
Next t

Hope this helps.
John
Project MVP
 

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