Remaining Duration etc.

J

JimS

Hi,

In my macro I need to update a task so that the end date matches one stored
in a variable. I presume that the correct way to do this is to set the
duration of the task so that the end date matches. But, if a task has
started, I need to set the remaining duration. If I'm going to calculate the
remaining duration, I need to know what date it was effective (so rem
duration = target end date - effective date for rem duration). Is there such
a date that I can use - is it the status date or is there something task
specific?

Or is there a better way of updating the task so that it finishes on a
specific date?

Cheers
JimS
 
J

John

JimS said:
Hi,

In my macro I need to update a task so that the end date matches one stored
in a variable. I presume that the correct way to do this is to set the
duration of the task so that the end date matches. But, if a task has
started, I need to set the remaining duration. If I'm going to calculate the
remaining duration, I need to know what date it was effective (so rem
duration = target end date - effective date for rem duration). Is there such
a date that I can use - is it the status date or is there something task
specific?

Or is there a better way of updating the task so that it finishes on a
specific date?

Cheers
JimS

Jim,
A few assumptions are associated with your scenario but to keep things
simple why not do the following. Take the difference between the
original Finish date and the desired Finish date and add or subtract it
to/from the original Duration. Keep in mind that the % Complete value
will change and may or may not need to be adjusted depending on why you
are messing with the task Finish date. Also depending on Task type,
resources assigned to the task may get changed.

Hope this helps.
John
 
J

JimS

Good idea John. I've also found that if I change the duration, the actual
duration remains constant while the remaining takes up the remainder. This
covers what I want to do.

Cheers
JimS
 
J

John

JimS said:
Good idea John. I've also found that if I change the duration, the actual
duration remains constant while the remaining takes up the remainder. This
covers what I want to do.

Cheers
JimS

Jim,
Great. By the way, how did you end up resolving your issue with daily
pay rates in your VBA code?

John
 
J

JimS

John,

In the end I rejected populating Excel with calculations based on the rate
and instead dumped hard figures instead (even with calculations it could have
been inaccurate as the rate may have changed over time - although not in my
plan at the moment). I also removed the decimal places in the formatting
which rounded the rounding errors correctly for display. I decided not to
use another calculated/storage field in MSP as I'm actually starting to run
low on free ones! All I can say is that my knowledge of the object model is
growing all the time and it's great to be able to bounce ideas/questions off
you guys.

Cheers
JimS
 
J

John

JimS said:
John,

In the end I rejected populating Excel with calculations based on the rate
and instead dumped hard figures instead (even with calculations it could have
been inaccurate as the rate may have changed over time - although not in my
plan at the moment). I also removed the decimal places in the formatting
which rounded the rounding errors correctly for display. I decided not to
use another calculated/storage field in MSP as I'm actually starting to run
low on free ones! All I can say is that my knowledge of the object model is
growing all the time and it's great to be able to bounce ideas/questions off
you guys.

Cheers
JimS

Jim,
Good, I'm glad you found an acceptable solution for your rate issue.

Running out of spare field huh? How about earlier versions of Project
with a lot less fields. We actually had to share fields because
everything was used. However we did have a defined usage chart that
everybody (IT, Project users, Project managers, etc.) had to abide by.
Training and discipline goes a long way in a multi-user environment.

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