A task that will update another task

J

jleifb

I have a grouping of milestone tasks that will be reported on for metrics at
the top of the plan. Is there a way to have a task in the plan update the
milestone/task at the top as the task becomes complete. So the top of the
plan would be for metrics, then below that would be the actual project plan.
As the tasks below come to completion, they would automatically update the
milestone tasks above. Is there an easy way to do this?
 
R

Rob Schneider

Project doesn't automatically status update projects AFAIK. That has to
be done manually by the user. You could automate what you do manually
by writing and using a short macro to do something like

: loop through all tasks in the file (or as selected)
: if this task is a milestone, then
: loop through all predecessors of this milestone task
: if all predecessors are complete, then
: mark milestone task complete.

I usually put the milestones that mark such completions near the tasks
that are the predecessors. Thus when the work tasks are shown as
complete, it's easy to remember to mark the milestone complete. No big
deal. I know that some really like to segregate these milestones at the
top or bottom of a plan ... I don't. But to satisfy those people I
simply use a filter to show only milestones and problem solved.

--rms

www.rmschneider.com
 
J

Jim Aksel

There was a similar post on this within the past 30 days. Rod Gill actually
posted some code that you can use as part of the ShutDown event for Project.

Essentially, the code loops through the Deliverables section at the top of
the file. If the predecessors for a milestone are complete, it marks Mr.
Milestone at 100%.

Please look for posts (answers) by Rod Gill in this forum. I'd do it and
post the link but I am actually quite busy at the moment.
--
If this post was helpful, please consider rating it.

Jim Aksel, MVP

Check out my blog for more information:
http://www.msprojectblog.com
 
J

jleifb

Thank you for the replies! I haven't been able to find that previous post
that you speak about. If you come across it, I would greatly appreciate it.

Thanks,
Josh
 
J

JulieS

Hello Josh,

I've copied Rod's reply below. You can find the original
information in a thread begun on 11 Sept by "Angela" titled Custom
Filter.

--------------------------------------------------------------

I use a macro that runs when any project is saved: it tests all
predecessors
of any milestone under a Summary Task called Deliverables and sets
them to
100% complete if all their predecessor tasks are complete. Put the
following
code in a Module:


Sub MilestonesUpdateComplete(Tsks As Tasks)
Dim Tsk As Task
Dim TskPred As Task
Dim Done As Boolean
For Each Tsk In
ActiveProject.Tasks("Deliverables").OutlineChildren
If Tsk.PredecessorTasks.Count > 0 And Tsk.Milestone Then
Done = True
For Each TskPred In Tsk.PredecessorTasks
If TskPred.PercentComplete < 100 Then
Done = False
Exit For
End If
Next TskPred
If Done Then
Tsk.PercentComplete = 100
End If
End If
Next Tsk
End Sub


And this code in the ThisProject file:

Private Sub Project_BeforeSave(ByVal pj As Project)
On Error Resume Next
If Not pj Is Nothing Then
If Not pj.Tasks("Deliverables") Is Nothing Then
MilestonesUpdateComplete
pj.Tasks("Deliverables").OutlineChildren
End If
End If
End Sub


For more VBA tips, come hear me talk at the project Conference in
Phoenix Az
next Tuesday!

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 

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