VBA equivalent to Complete Through?

J

Jack Dahlgren

I'm trying to automate some schedule quality checks and one of the checks is
to see if there is no uncompleted work in the past.

It is easy to show tasks which have uncomplete work in the past using
barstyles using the "CompleteThrough" date, but I'm wondering if there is
some way to obtain that date programmatically and reliably. Anyone have any
suggestions?

-Jack Dahlgren
 
J

John

Jack Dahlgren said:
I'm trying to automate some schedule quality checks and one of the checks is
to see if there is no uncompleted work in the past.

It is easy to show tasks which have uncomplete work in the past using
barstyles using the "CompleteThrough" date, but I'm wondering if there is
some way to obtain that date programmatically and reliably. Anyone have any
suggestions?

-Jack Dahlgren

Jack,
Oh that old elusive algorithm. As I recall, about a year ago there was
some discussion, (I think in the main newsgroup, but maybe it was in
this group), concerning how Project determines the complete through
date. I know Steve House participated in the thread and there was some
other guy that mentioned in his responses that he was somehow involved
in helping develop the algorithm for the complete through date in
Project. However, my memory is fuzzy and I may be thinking of something
else. Unfortunately I didn't save or mark that particular discussion.
You can try a search or perhaps contact Steve.

If you find out, please post back. I'm sure a lot of folks would be
interested, including myself.

John
 
J

Jan De Messemaeker

Hi Jack,

I did a quality check program for a customer some 6 years ago and here's my
code for uncompleted work in the past:

'--------------------------------------------------------------------------
'The following routine will look for the oldest date for which the task
'has work planned that is not actual work.
'If the task is finished, obviously we should not change the oldest date
'If it has not started, this oldest Remaining Work date is its start date
'If it is partially finished, it is the .Resume property
'--------------------------------------------------------------------------
If (aTask.Work > 0) And Not aTask.ExternalTask Then
Select Case aTask.ActualWork
Case 0
If Not IsDate(aTask.Resume) Then
OWD = aTask.Start
Else
OWD = aTask.Resume
End If
Case aTask.Work
OWD = vba.date
Case Else
OWD = aTask.Resume
End Select
If OWD < LastMonth Then
ZTasksMonthLate = ZTasksMonthLate + 1

Hope this helps,

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
G

Gérard Ducouret

Hello Jack, John and Jan,

Haven't you tried to use the Stop field ?

Gérard Ducouret
 
J

Jan De Messemaeker

Hi Gerard,

I prefer the resume field to the stop field.
Normally the quality requirement is not to have any work scheduled in teh
past
When yoiu have a split task, with a stop say last month, but a Resume
tomorrow, using he stop feld would show it as "bad quality" whereas it is
perfect.

For tasks that aren't split Stop and resume are equivalent.

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
J

Jack Dahlgren

Thanks for the lesson! I'll get to work with the Resume field. From what you
posted it looks like it will do the job. I was thinking of using TSV's and
was not looking forward to it.

-Jack Dahlgren
 
J

Jan De Messemaeker

Hi Jack,

I first thought of TSV's...
BTW, I'll never forget the lessons you learned me in those days!
That's the advantage of a Newsgroup, nobody has all the experience but
together we have it.

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
J

Jim Aksel

This was a helpful discussion, thanks gentlemen. Just as another point of
view, we sometimes check programmatically for "No incomplete work to the left
of the status date" by using (for each non-summary, not external task, that
is not nothing....)

If ((pTask.Finish <= mProject.statusdate) And (pTask.Finish <>
pTask.ActualFinish)) Then
'Identify incomplete work that should be finished
'Finish and Actual Finish will be the same if the task is complete.
pTask.Flag10 = True ' <<== Or anything else you might like.
End If

The idea is that a task is complete only when an Actual Finish date exists.
--
If this post was helpful, please consider rating it.

Jim

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 
B

Bruce McF

Very helpful.

I came to this thread in search of tools to explain strange Completed
Through behavior in 2007 ... completed work apparently in the future in
spite of "Move end of completed parts after status date back to status date".

In Professional 2007, moving moving end of completed before status date,
the Gantt View bar shows 5 days Actual Work (correct) ending at the Status
Date (3/27, correct), then the expected task split, then another one day plus
of completed work in the future. (!) Mousing over the bar, Completed Through
is 5/5 (???) while Resume is 5/2 (correct). The five Actual Work days seem
to be correctly accounted for in the portion of the bar shown before the
Status Date.

Is this a known bug or am I missing something further in the Completed
Through algorithm?

Thanks,
Bruce

p.s. In all cases where an Actual work update would push the task start
before the project start, the task was allowed to start before the project
start.
 

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