How to tell if a task is hidden, open, closed

D

djlewis2

Is there any way in VBA for Project to tell if a task is hidden because
one of its ancestors is closed in the outline? Or is there a way to
tell if a task is open or closed in the outline, that is, are its
children are showing (+) or not showing (-).

Thanks. --David.
 
D

djlewis2

Ah, I think I answered my own question, at least regarding hiddenness,
and partly the other one (how to go to a specific task id). Does this
make sense? Is there a better way?

Function IsHidden(TaskID As Integer)
On Error GoTo Err
EditGoTo ID:=TaskID
On Error Resume Next
IsHidden = False
Exit Function
Err:
IsHidden = True
End Function

Sub TestIt()
Dim B As Boolean
B = IsHidden(23)
End Sub

Now, how do I go from that -- or any way -- to telling which tasks are
open and closed in the outline? Hmmm.. I can see something like
this... if it's a summary task, then it is open if and only if it's
ID+1 is showing. Nope, that doesn't work for "latently open" tasks,
does it, that is, tasks that are hidden by a parent being closed, but
when exposed are open, not closed. Any ideas? Maybe you have to start
at the leaves and work up to parents somehow. Ummm... too late at
night... head hurting...

Thanks. --David.
 
Top