J
Jim Aksel
I am attempting to save a baseline (could be baseline1, baseline2, etc.) from
a master project down into the subordinate projects. That is, if I decide to
set a baseline for a master projectd, I want to also save the same baseline
number for all the inserted subprojects.
The code below appears to work only on the tasks in the master project and
does not propagate into the other files. Any ideas would be helpful. Our
alternative is to do it manually in each file.
Note this code works fine for setting status dates in each file (need to
change only one line of code)
Public Sub DriveDownBaseline5()
Call DrillBaseline5(Application.ActiveProject)
End Sub
Private Sub DrillBaseline5(ByRef mProject As Project)
Dim bProject As Project
Dim sProject As Subproject
'This overwrites entire Baseline5 for entire mProject
'However it only appears to work for the active project
BaselineSave All:=True, Copy:=pjCopyCurrent, Into:=pjIntoBaseline5
If mProject.Subprojects.Count = 0 Then
'base case do nothing, baseline already saved
Exit Sub
Else
For Each sProject In mProject.Subprojects
Set bProject = sProject.SourceProject
Call DrillBaseline5(bProject)
Next sProject
End If
End Sub
a master project down into the subordinate projects. That is, if I decide to
set a baseline for a master projectd, I want to also save the same baseline
number for all the inserted subprojects.
The code below appears to work only on the tasks in the master project and
does not propagate into the other files. Any ideas would be helpful. Our
alternative is to do it manually in each file.
Note this code works fine for setting status dates in each file (need to
change only one line of code)
Public Sub DriveDownBaseline5()
Call DrillBaseline5(Application.ActiveProject)
End Sub
Private Sub DrillBaseline5(ByRef mProject As Project)
Dim bProject As Project
Dim sProject As Subproject
'This overwrites entire Baseline5 for entire mProject
'However it only appears to work for the active project
BaselineSave All:=True, Copy:=pjCopyCurrent, Into:=pjIntoBaseline5
If mProject.Subprojects.Count = 0 Then
'base case do nothing, baseline already saved
Exit Sub
Else
For Each sProject In mProject.Subprojects
Set bProject = sProject.SourceProject
Call DrillBaseline5(bProject)
Next sProject
End If
End Sub