Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

VBA for Counting Overallocated Resources in MS Project 2010

$
0
0

Hi All

I am struggling with a piece of code to count the number of overallocated resources in a Project.  The code I have tried is below for information:

Sub OverallocatedResources()
Dim A As Assignment
Dim overAllocatedCt As Integer
overAllocatedCt = 0
For Each A In ActiveProject.Tasks(1).Assignments
If A.Overallocated = "Yes" Then
    'Overallocated Resources
    overAllocatedCt = overAllocatedCt + 1
End If
Next
statString = statString & "Resource Overallocated Tasks: " & vbTab & overAllocatedCt & vbCrLf
MsgBox statString
End Sub

Any help/guidance would be appreciated.

Thanks in anticipation.

Tony


TKHussar


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>