Project 2003 Update Column

T

Tim Di Prinzio

Not sure if this makes sense or not but, I am using project 2003 and
have created a master project file to track other projects. I have
inserted other project files into the master project. Updates on tasks
from both seem to work fine. I have a column that using a graphical
indicator for project status. I would like to have that column updated
automatically in the master project file when the individual project is
updated.

Would I have to write some vba code to accomplish this??

Thnaks
Tim
 
J

Jim Aksel

I think I understand what you want...
A formula for your status indicator will execute per the information
contained in each individual file and provide a calculated value for you.
Each file (including the master project) carries its own status date. So,
you need to ensure the status date is the same in all the project files.

Here is some code that will do it for you that I happen to have laying
around. The code would be executed from the Master Project level as the
active project.

Public Sub DriveDownStatusDate()

Dim result As VbMsgBoxResult
Dim statusdate As Date
If (ActiveProject.statusdate = "NA") Then
result = MsgBox("Status Date is N/A, no action will be taken.", vbOKOnly,
"No Status Date Set")
Exit Sub
End If


statusdate = ActiveProject.statusdate
result = vbNo 'set to safe state
If (Abs(DateDiff("d", Now(), ActiveProject.statusdate)) > 30) Then
result = MsgBox("Status Date appears unreasonable" + _
vbCrLf + "Today: " & Str(Now()) + vbCrLf + _
"Status Date: " & Str(ActiveProject.statusdate), vbInformation, "Status Date
Check")
End If

result = MsgBox("Status Date: " & ActiveProject.statusdate & vbCrLf & _
"Assign this status date (recursively) to all subprojects in the active
project?", _
vbQuestion + vbOKCancel, "Confirm Status Date Propogation")

If result = vbOK Then
Call DrillStatusDown(Application.ActiveProject, statusdate)
Debug.Print ("Drilldown Complete")
Else
MsgBox ("Action canceled by user")
End If
End Sub

Private Sub DrillStatusDown(ByRef mProject As Project, ByVal statusdate)
Dim sProject As Subproject
Dim bProject As Project

mProject.statusdate = statusdate
Debug.Print ("Arrived: " & mProject.Name & " " & mProject.Subprojects.Count)

If mProject.Subprojects.Count = 0 Then
'Base Case
Exit Sub
End If
Dim icounter As Integer
icounter = 0
For Each sProject In mProject.Subprojects
icounter = icounter + 1
Debug.Print ("Prior to Set: " & mProject.Name & " icounter=" & icounter)
Set bProject = sProject.SourceProject
Debug.Print ("Successful Set: " & bProject.Name)
bProject.statusdate = statusdate
Debug.Print ("Status Date Set: " & bProject.Name)
Call DrillStatusDown(bProject, statusdate) 'recursively push status date
Debug.Print ("Successful Return from: " & bProject.Name)
Next
End Sub

The Deug.Print statements can be removed.


--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 
J

Jim Aksel

One more item. As long as the Master Project File contains *Linked* files
not inserted copies, you will see the same thing on master as if you opened
the individual files, the calculations are performed as if each file were
opened separately. This way your %Complete migrates over, etc.
--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 

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