Can What-If Scenarios be created in MS Project 2000?

J

JR

What I want to do is create multiple "what-if" scenarios that can be
visible all from the same file. The way it would work is the
following:
1) The logic would remain constant.
2) As usual, the logic and duration will determine the values for
Start and Finish fields.
3) For "what-if" scenario 1, I would enter an alternate duration into
the Duration1 field and the Start1 and Finish1 fields would be
calculated. Scenario 2 would use the Duration2, Start2, and Finish2
fields and so on.

Has this already been done? Is there some setting in Project that
already does this? If not, is there a macro that already does this?

Thank you!
JR
 
J

JackD

There is no setting in project to do this (discounting the wierd pert
analysis)
I've written a macro which does this.
No time now, but I'll publish it tomorrow.
Basically it copies duration, start and finish into a spare duration field
(so you can get them back)
copies duration from say duration1, recalculates, saves start/finish in
start1/finish1
same for duration2 etc.
Then copies the original duration back and recalculates.
Finally formats bar style so that it shows a bar for each schedule so you
can compare.

Pretty simple to do.

-Jack
 
J

JR

Thank you! Please post the link of your macro as a reply to this
message. I would like to try it out! Thanks again!

JeffR
 
J

JackD

Here is the macro. Use it on a COPY of your schedule and test it before
using. I'm NOT responsible if you LOSE all of your work.

-Jack


Sub choose()
'Copyright Jack Dahlgren, October 2004.
Dim jString As String
'Prompt user for which schedule to use.
'A gives the aggressive schedule
'P gives a pessimistic schedule
'No entry (just return cancels the macro
MsgBox "This macro switches between aggressive durations (stored in
duration5) and pessimistic durations (duration1) then recalcs the schedule."
jString = InputBox(("Please Enter Schedule Type" & Chr(13) & Chr(13) & "P
(Pessimistic)" & Chr(13) & "A (Aggressive)" & Chr(13) & "R (Oops!
Restore previous schedule)"), "Choose Schedule")
jString = UCase(Left(jString, 1))
If jString = "" Then
Exit Sub
End If


Select Case jString
'calc pessimistic schedule
Case "P"
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
If Not t.summary Then
'store current duration in text10 so restore can work
t.Duration10 = t.Duration
'copy duration from duration1
t.Duration = t.Duration1
End If
End If
Next t
'calculates the schedule using new durations
CalculateProject
'stores the pessimistic data so bars can be drawn and ww can be output
savepessfinish

'calcs aggressive schedule
Case "A"
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
If Not t.summary Then
t.Duration10 = t.Duration
t.Duration = t.Duration5
End If
End If
Next t
CalculateProject
saveaggfinish

'resets values to what they were before the macro was run
'only recovers one level deep
Case "R"
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
If Not t.summary Then
t.Duration = t.Duration10
End If
End If
Next t
CalculateProject
End Select
End Sub

Sub saveaggfinish()
Dim t As Task
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
t.Text6 = t.Text30
t.Finish6 = t.Finish
t.Start6 = t.start
End If
Next t

End Sub

Sub savepessfinish()
Dim t As Task
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
t.Text7 = t.Text30
t.Start7 = t.start
t.Finish7 = t.Finish
End If
Next t

End Sub
 

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