Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting Tasks 1

Status
Not open for further replies.

Krusher

IS-IT--Management
Jan 2, 2003
70
US
Does anyone know of a way to return a count of summary tasks (top level tasks) in project? I wrote a VB macro to count active.selection, but I need a way to distinguish between summary and child level (indented) tasks. Many thanks in advance.
 
What do you want to have happen when you have a summary task that includes one (or more) summary tasks?

summary-taskA
detail-taskB
detail-taskC
summary-taskD
detail-taskE
detail-taskF
summary-taskG
detail-talkH
summary-taskI
detail-taskJ
summary-taskK
detail-taskL
detail-taskM



So ... what number of summary tasks appear in the above task sequence?

Your answer to that will tell me what code you need.
 
PDQBach,
The count would be 5. I would basically like to see all "parent" (summary) tasks even if the parent is a child itself as you have shown. Looking forward to seeing the code you come up with for this. I appreciate your time in helping me on this. Many thanks :)
 
dim tt as task
dim cntr as integer

for each tt in activeproject.tasks
if not tt is nothing then
if tt.summary then
cntr = cntr+1
end if
end if
next

 
Just what I was looking for PDQBach! Many thanks to you :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top