Skip to content

Latest commit

 

History

History
74 lines (45 loc) · 2.09 KB

Project.overallocatedassignments.md

File metadata and controls

74 lines (45 loc) · 2.09 KB
title ms.service ms.assetid ms.date ms.localizationpriority
OverAllocatedAssignments object (Project)
project-server
b2856ebf-cff2-04a6-53c9-123de09f2a3b
06/08/2017
medium

OverAllocatedAssignments object (Project)

Represents a collection of Assignment objects where the resource is overallocated.

Remarks

Use the Item property to get a single Assignment object from the OverAllocatedAssignments collection.

Example

The following example finds assignments where the resource is overallocated. When the overPeak argument is False, the overallocation is not greater than the maximum resource time available (100%). If you set overPeak to True, the example finds overallocated assignments that exceed maximum resource time available, such as 150%.

Sub FindOverallocatedAssignments()  
    Dim t As Task  
    Dim a As Assignment  
    Dim overAlloc As OverAllocatedAssignments  
    Dim numOver As Long  
    Dim overPeak As Boolean  
  
    overPeak = False  
  
    For Each t In ActiveProject.Tasks  
        If t.Overallocated Then  
            Set overAlloc = t.StartDriver.OverAllocatedAssignments(overPeak)  
            numOver = overAlloc.Count  
            totalNumOver = overAlloc.TotalDetectedCount  
  
            For Each a In overAlloc  
                Debug.Print "Resource: " & a.Resource.Name & " is overallocated on task: " & t.Name  
                Debug.Print vbTab & "Number of overallocated assignments: " & numOver  
            Next a  
        End If  
    Next t  
End Sub

Properties

Name
Application
Count
Item
Parent
TotalDetectedCount

See also

Project Object Model

[!includeSupport and feedback]