Jack and Newbie,
Thanks for the big heads-up on this. This is very cool. I wasn't aware this even existed. I've never seen it, used it or seen it documented anywhere. Is it documented? Anywhere? It's not in the help, not that I can see. How long has it been there? I can't wait to use it. Holy mackerel, I think my heads gonna explode! ;>)
And how stupid do I feel raving on about task types. Sorry Newbie! My apologies. And that nugget from Gerard looks like just the fix you need for your question.
I always like to say that you learn something new everyday, and sometimes you're really lucky and it'll be two things. I got my two for today! Thanks again.
Earl
Earl,
Perhaps you are not aware, but you can enter a duration for a task using
elapsed time (edays for example) and it will calculate as if the task were
on a 24 hour 7 day calendar. This is useful for tasks such as concrete
curing etc. where elapsed duration is really what you want. It seemed to me
that the person asking the question was wondering how you distinguish tasks
entered with an elapsed duration from within VBA.
I'm not sure there is an explicit marker so I suggest checking to see if the
elapsed duration = the elapsed duration (not taking into account the
calendar).
--
-Jack ... For project information and macro examples visit
http://masamiki.com/project
..
Earl Lewis said:
Newbie,
Duration is by definition the elapsed time between the start and end
dates - in work days (or hours, minutes, weeks or months) depending on how
you choose to display it.
However, the duration field holds the number of work minutes, calculated
based on the selected task type, the amount of work and the resources
assigned to it. Again, dependent on the selected task type and other task
values.
Even though the field is primarily a data entry field it will calculate
(and recalculate) after its had a value entered into it. In other words, if
you change one of the parameters that go into duration calculation, like
task type the duration will change - even though you typed it in and may not
want it to.
Excerpt from the help file on the subject:
=================================
Enter task durations (duration: The total span of active working time that
is required to complete a task. This is generally the amount of working time
from the start to finish of a task, as defined by the project and resource
calendar.) and indicate whether the durations are estimated or set.
=================================
I guess if you give your definitions for how "elapsed" duration differs
from "standard working time" we can probably offer a better answer.
Also, what exactly are you trying to acheive with your routine? Maybe more
info from you could prompt others to come up with the "right" solution.