macro to count all tasks (no sumary or milestones) in a project

R

Rod Gill

Sub CountTasks()
Dim Count As Long
Dim Tsk As Task
For Each Tsk In ActiveProject.Tasks
If Not Tsk.Summary And Not Tsk.Milestone Then
Count = Count + 1
End If
Next Tsk
MsgBox "Number of non-summary and non-milestone tasks is: " & Count,
vbInformation + vbOKOnly
End Sub


--

Rod Gill
Microsoft MVP for Project - http://www.project-systems.co.nz

Author of the only book on Project VBA, see: http://www.projectvbabook.com




Marty said:
__________ Information from ESET Smart Security, version of virus
signature database 4849 (20100208) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4849 (20100208) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

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