Peak Property
Returns the largest number of resource units assigned for the assignment. Read-only Variant.
Example
The following example finds any assignments with more than a certain number of resource units assigned.
Sub FindOverassigned()
Dim T As Task, A As Assignment
Dim TooMany As Double, Results As String
TooMany = InputBox("Enter maximum allowed units per assignment: ")
For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
For Each A In T.Assignments
If A.Peak > TooMany Then
Results = Results & T.Name & ": " & A.ResourceName & vbCrLf
End If
Next A
If Results <> "" Then MsgBox "The following resources are " & _
"assigned more than " & TooMany & " units:" & vbCrLf & Results
Results = ""
End If
Next T
End Sub
Applies to | Assignment Object, Assignments Collection Object
See Also | PeakUnits Property