Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.18 KB

Project.Assignment.Peak.md

File metadata and controls

52 lines (36 loc) · 1.18 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Assignment.Peak property (Project)
project-server
Project.Assignment.Peak
52b5d301-6034-b207-c5ae-dfadb56ecd73
06/08/2017
medium

Assignment.Peak property (Project)

Gets the largest number of resource units for the assignment. Read-only Variant.

Syntax

expression. Peak

expression A variable that represents an Assignment object.

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

[!includeSupport and feedback]