There is more than one way to solve this. We use deadline dates and let them
fall on the weekend. If they do, we manually adjust them.
Project uses two types of days: days are work days, elapsed days (edays)
are calendar days. Using eDays may land you on a nonwork day as you said.
Most people are tempted to use a "submit" milestone and tag it with a
predecessor "Contract Award + 30ed". However, what you really have is a
Deadline not a true predecessor. The real predecessors are "do some work",
"Create Output", "Send it to contracts for delivery".
Others are tempted to use a Finish No Later Than constraint and key a date.
That doesn't work either because it may allow the scheduling logic to push
the predecessor finish dates past your FNLT date on "submit."
Some use predecessors "Contract Award + 20d" or 22d, figuring 30 days means
"a month and that's about 4 weeks or so". Not a bad way to go. But again,
those are Deadlines not true predecessors.
I posted a similar question on the Developer newsgroup the other day ... how
do I set the deadline date via code. One of the MVPs, Rod Gill, provided the
code below for a Macro. Here is its along with my comments on where you will
need to modify the code to get it to tag out to the next work day. What you
have to do in this code is select the task "submit", have the "contract
award" as the FIRST predecessor with no lag. There will be other "real"
predecessors. When you run the macro it will give you a Deadline date 30
edays after the finish date of the first predecessor.
When scheduling, a red diamond will appear on the "submit" task if it slips
past the deadline date in the task information column.
Here's the code Rod provided with some tweaks I added:
Sub VariableDeadline()
'This macro will place a Deadline Date on the selected task
'based on the finish date of the first predecessor listed in the
'selected task's predecessors.
Dim Tsk As Task
Set Tsk = ActiveCell.Task.PredecessorTasks(1) 'change the 1 to the
desired (devined) predecessor if yo wish
ActiveCell.Task.Deadline = DateAdd("d", 30, CDate(Tsk.Finish)) 'change
30 to number of days desired, these are elapsed days.
'Your new code here---
if (Weekday(ActiveCell.Task.Deadline)=1 or
Weekday(ActiveCell.Task.Deadine)=7) the
'change it to the next work day
'I would use the DateAdd function again depending on the value returned from
Weekday().
End if
End Sub
What the code does is jam the constraint date, and then reset it if it has
to. Not elegant, but it will work.
Unfortunately, you'll need to rerun the macro if other constraints cause the n
--
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