Hi,
I'm working with a MS Project file, and I want to count the tasks in the project. I have a piece of code that works for this, but it counts every line item in the file. Some of the lines are not actually tasks, but actually headers and notations where milestones were met throughout the course of the project. The only way I know to get around this is by NOT counting what is in bold (Headers and Milestones) to get a true count of actual tasks.
Here is the code I have so far.....
Sub TasksCount()
SelectAll
MsgBox ActiveSelection.Tasks.Count
End Sub
Here is a visual of what I'm trying to accomplish with line numbering......
21 -Plan Risk > Risk Management (do not count...would be in bold)
22 Identify Risks (count)
23 Perform Qualitative Risk Analysis (count)
24 Perform Quantitative Analysis (count)
I'm working with a MS Project file, and I want to count the tasks in the project. I have a piece of code that works for this, but it counts every line item in the file. Some of the lines are not actually tasks, but actually headers and notations where milestones were met throughout the course of the project. The only way I know to get around this is by NOT counting what is in bold (Headers and Milestones) to get a true count of actual tasks.
Here is the code I have so far.....
Sub TasksCount()
SelectAll
MsgBox ActiveSelection.Tasks.Count
End Sub
Here is a visual of what I'm trying to accomplish with line numbering......
21 -Plan Risk > Risk Management (do not count...would be in bold)
22 Identify Risks (count)
23 Perform Qualitative Risk Analysis (count)
24 Perform Quantitative Analysis (count)