Deadlines don't change with 'Adjust Date' button

V

van der Linden

I have a question, when I use the button Adjust Dates, only the dates are
changing, but not the deadlines. In a project I use the taskbars as a
specification period, and the deadline as an ultimate date of ordering. For
the next project we have to order about the same products with the same
delivery periods, so only the dates have to be adjusted, but the deadlines
have to adjust as well! And I have 250 deadlines, so manually won't be
convenient.
I asked this already in the 'General Question' forum, but the conclusion was
to use VBA. Can someone help me? Where can I find the code behind the Adjust
Dates button? I hope this can be changed quite easily in a macro to change
the deadlines!?

I hope someone can help me!?
 
J

John

van der Linden said:
I have a question, when I use the button Adjust Dates, only the dates are
changing, but not the deadlines. In a project I use the taskbars as a
specification period, and the deadline as an ultimate date of ordering. For
the next project we have to order about the same products with the same
delivery periods, so only the dates have to be adjusted, but the deadlines
have to adjust as well! And I have 250 deadlines, so manually won't be
convenient.
I asked this already in the 'General Question' forum, but the conclusion was
to use VBA. Can someone help me? Where can I find the code behind the Adjust
Dates button? I hope this can be changed quite easily in a macro to change
the deadlines!?

I hope someone can help me!?

van der Linden,
As far as I know microsoft stopped providing the code behind its
utilities starting with Project 2000. That means the code for the
"Adjust Dates" utility IS available under Project 98, if you know
someone who has that version. Just for reference the actual code for the
utility is only a few lines long but the code behind the accompanying
userform is moderately complex.

Personally, I would probably just develop my own code to adjust the
deadline dates after the "Adjust Dates" utility has been run. Depending
on the relationship between the deadlines the the tasks leading up to
them, the code may not be that complex.

John
Project MVP
 
V

van der Linden

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...???
 
J

John

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)
 
V

van der Linden

John,
Thanks again! (Sorry, I meant your response of course, the Dutch word for
response is almost the same as reaction)

I understand it is not really easy to write this macro...

I didn't think of the problems with holidays and other non working days.
Thanks for that tip!
Next time I will change the dates after a put the calender on standard, so
without holidaytime.

But, this morning I found a very easy solution: I copied the dates from the
deadline column, opened a new file (with the Standard calender and the same
start of project date) and pasted the dates in the start column. Then I
pushed the adjust dates button and changed the deadline dates. Then I copied
the dates back into the deadline column in the first file.
Not a real neat solution, but at least it saves me to change 250 dates by
hand or writing a complicated macro...

Thanks, Sophia van der Linden
 
J

John

van der Linden said:
John,
Thanks again! (Sorry, I meant your response of course, the Dutch word for
response is almost the same as reaction)

I understand it is not really easy to write this macro...

I didn't think of the problems with holidays and other non working days.
Thanks for that tip!
Next time I will change the dates after a put the calender on standard, so
without holidaytime.

But, this morning I found a very easy solution: I copied the dates from the
deadline column, opened a new file (with the Standard calender and the same
start of project date) and pasted the dates in the start column. Then I
pushed the adjust dates button and changed the deadline dates. Then I copied
the dates back into the deadline column in the first file.
Not a real neat solution, but at least it saves me to change 250 dates by
hand or writing a complicated macro...

Thanks, Sophia van der Linden

Sophia,
OK, it looks like you found a workable solution. There is nothing wrong
with a solution that works. Macros are great but there aren't
necessarily the best solution for those one-shot issues. In those cases,
a simple brute force method fills the bill.

Oh, and you're welcome. Thanks for the feedback.
John
 

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