van der Linden said:
John, thanks for the reaction.
Ok, so it is better to write a new code. No problem, but I'm no VBA master,
I hoped I could use that code as an example. But now I don't have the
example, can someone help me with writing? The deadlines are in no way linked
to eachother, so that might make it easier.
So what had to be done: Ask what the new startdate should be in a window
(just the same as when you push the button Adjust Dates). Select the column
Deadline, calculate how many days all the dates should move, calculate for
every date a new date, paste it into the same column.
Who can give me some assistance? I can make a window with a question, but
further...???
van der Linden,
My reaction? I think you meant my response.
I didn't say it was necessarily better to write new code, it's just what
I would do.
I didn't assume the deadlines were linked to each other. What I do
assume is that each deadline is linked, (indirectly since deadlines are
not directly linkable objects in Project), to one or more tasks that
lead up to it. It is this relationship that I would use for a macro to
update them. Now, if the deadline dates are all shifted by a fixed
amount, then it would be even easier - but be careful, this simplified
approach may not be appropriate. Let me illustrate. Let's say you have a
project that starts on 9/1/06 and your first deadline is 11/15/06 with a
second deadline on 1/15/07. Your project also has a holiday calendar
that makes the last two weeks of the year non-working. Now, you use the
Adjust Dates utility to move the start date out by one month (i.e. to
10/1/06). If all deadlines are shifted by this same amount, the first
deadline will be 12/15/06 and the second on 2/15/06. (Note that I'm
using a generic month instead of taking into account a month of working
days (normally 20) to keep this example simpler.) There is no problem
with the first deadline but the second deadline may or may not be
correct. It was moved out 30 days with no regard to the tasks that may
be leading up to it. If one or more of those tasks spanned the
non-working time in December, then that time needs to be accounting for
when moving the second deadline. This is what I meant by "linking" the
deadlines to tasks. Make sense?
Based on the above I would develop a deadline adjusting macro that looks
at the relationship of each deadline to its driving tasks. You mentioned
making a window with a question to ask for the date. Are you talking
about an input box as part of a userform (VBA) or are you referring to
an interactive filter which also puts up a window with a question? They
are very different.
Most likely, no further user input is required after the Adjust Dates
utility is run. That utility does NOT adjust baseline dates. Therefore,
a follow on macro to adjust the deadline dates can use the project
summary task baseline start date and calculate the delta between it and
the new project start date. This assumes the scheduled start date and
baseline start date for the project summary task were the same. If not,
then a user input may be needed to initiate the deadline adjustment.
Once the date delta is established, then the code should go to each task
associated with each deadline and make the appropriate deadline
adjustment.
As you can see, the process isn't as simple as it may seem but it
definitely can be done with VBA. Who can do it? I can or anyone else who
has some VBA experience. It may or may not cost you something to get the
code written for you. If you want to contact me directly, you may at the
address below. Or, you could see if someone else responds to this
thread. Who knows, maybe someone else has a clever, simple solution that
I didn't think of.
John
Project MVP
jensenj6atatcomcastdotdotnet
(remove obvious redundancies)