Share via


Task.Overallocated Property

Project Developer Reference

True if any of the assignments for a task is overallocated. Read-only Boolean.

Syntax

expression.Overallocated

expression   A variable that represents a Task object.

Return Value
Variant

Example
The following example displays the percentage of resources in the active project that are overallocated.

Visual Basic for Applications
  Sub DisplayOverallocatedPercentage()
Dim R As Resource               ' Resource object used in For Each loop
Dim NOverallocated As Long      ' Number of overallocated resources

For Each R In ActiveProject.Resources
    If R.<strong class="bterm">Overallocated</strong> Then NOverallocated = NOverallocated + 1
Next R

MsgBox (Str$((NOverallocated / ActiveProject.Resources.Count) * 100) _
&amp; " percent (" &amp; Str$(NOverallocated) &amp; "/" &amp; Str$(ActiveProject.Resources.Count) _
&amp; ")" &amp; " of the resources in this project are overallocated.")

End Sub

See Also