M
Marty
I have generated a number of VBA modules that count various types of tasks in
a project and display the count total in a Message box. But there doesn't
appear to be a way to copy or cut the number out of the message box. How do
I get the total number out of the message box and pasted into Excel? Or how
do I get the total count some other way in project so I can paste it into
Excel? A sample of my VBA code is below.
Sub Total_Completed_Number_of_Tasks()
Dim T As Task
Dim C As Long
For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
If T.Summary = False Then
If T.PercentComplete = 100 Then
C = C + 1
End If
End If
End If
Next T
MsgBox Prompt:="The Project Contains " _
& C & " Completed non-Summary tasks"
End Sub
a project and display the count total in a Message box. But there doesn't
appear to be a way to copy or cut the number out of the message box. How do
I get the total number out of the message box and pasted into Excel? Or how
do I get the total count some other way in project so I can paste it into
Excel? A sample of my VBA code is below.
Sub Total_Completed_Number_of_Tasks()
Dim T As Task
Dim C As Long
For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
If T.Summary = False Then
If T.PercentComplete = 100 Then
C = C + 1
End If
End If
End If
Next T
MsgBox Prompt:="The Project Contains " _
& C & " Completed non-Summary tasks"
End Sub