M
MichaelA
Hello All,
Now I am a little stumped. I am needing to recurse upwards through
summary tasks.
I am using the newtask event which has the parameters: pj as project;
id as long
current task is pj.tasks.uniqueid(id)
parent task is pj.tasks.uniqueid(id).outlineparent
dim tsk as task
'I should be able to move upwards by doing this
tsk = pj.tasks.unique(id).outlineparent
so then going up again
tsk = tsk.outlineparent
But I keep getting an error.
here is my actual code that I have finessed to no avail.
taskLevel = pj.Tasks.UniqueID(ID).OutlineLevel
Set tsk = pj.Tasks.UniqueID(ID)
If taskLevel > 2 Then
While taskLevel > 2
tsk = tsk.OutlineParent
taskLevel = tsk.OutlineLevel
Wend
End If
Any thoughts on where I have gone wrong?
Thanks and regards
Michael A.
Now I am a little stumped. I am needing to recurse upwards through
summary tasks.
I am using the newtask event which has the parameters: pj as project;
id as long
current task is pj.tasks.uniqueid(id)
parent task is pj.tasks.uniqueid(id).outlineparent
dim tsk as task
'I should be able to move upwards by doing this
tsk = pj.tasks.unique(id).outlineparent
so then going up again
tsk = tsk.outlineparent
But I keep getting an error.
here is my actual code that I have finessed to no avail.
taskLevel = pj.Tasks.UniqueID(ID).OutlineLevel
Set tsk = pj.Tasks.UniqueID(ID)
If taskLevel > 2 Then
While taskLevel > 2
tsk = tsk.OutlineParent
taskLevel = tsk.OutlineLevel
Wend
End If
Any thoughts on where I have gone wrong?
Thanks and regards
Michael A.