Application.LevelingOptionsEx Method (Project)

Specifies leveling options for the active project, including leveling of manually scheduled tasks.

Version Information

Version Added: Project 2010

Syntax

expression .LevelingOptionsEx(Automatic, DelayInSlack, AutoClearLeveling, Order, LevelEntireProject, FromDate, ToDate, PeriodBasis, LevelIndividualAssignments, LevelingCanSplit, LevelProposedBookings, LevelPinnedTasks)

expression An expression that returns an Application object.

Parameters

Name

Required/Optional

Data Type

Description

Automatic

Optional

Boolean

True if Project automatically levels tasks in the active project. False if leveling is manual. The default value is False.

DelayInSlack

Optional

Boolean

True if the active project can be leveled only within the available slack time. False if the project can be delayed to level resources. The default value is False.

AutoClearLeveling

Optional

Boolean

True if Project clears old leveling values before leveling; otherwise, False. The default value is True.

Order

Optional

Integer

A constant that specifies how Project should resolve resource conflicts when leveling tasks in the active project. Can be one of the PjLevelOrder constants. The default value is pjLevelOrderStandard.

LevelEntireProject

Optional

Boolean

True if the entire project is leveled. False if only the resources in the date range specified with FromDate and ToDate are leveled. The default value is True.

FromDate

Optional

Variant

The starting date of a range within which overallocated resources are leveled. The FromDate argument is ignored if LevelEntireProject is True.

ToDate

Optional

Variant

The ending date of a range within which overallocated resources are leveled. The ToDate argument is ignored if LevelEntireProject is True.

PeriodBasis

Optional

Integer

Specifies how often Project should look for overallocated resources. Can be one of the PjLevelPeriodBasis constants. The default value is pjDayByDay.

LevelIndividualAssignments

Optional

Boolean

True if leveling can adjust individual assignments on a task; otherwise, false. The default value is True.

LevelingCanSplit

Optional

Boolean

True if leveling can create splits in remaining work; otherwise, False. The default value is True.

LevelProposedBookings

Optional

Boolean

True if leveling includes proposed resource bookings; otherwise, False. The default value is False.

LevelPinnedTasks

Optional

Boolean

True if manually scheduled tasks are leveled; otherwise, False. The default value is False.

Return Value

Boolean

Remarks

If an argument is omitted, its default value is specified by the current setting in the Resource Leveling dialog box. The default values specified in the list of parameters are for a new installation of Project. To access the Resource Leveling dialog box, on the Resource tab of the Ribbon, click Leveling Options.

Using the LevelingOptionsEx method without specifying any arguments displays the Resource Leveling dialog box.

To get or set only the option for leveling manually scheduled tasks, see the LevelFreeformTasks property.

Example

The following example levels only selected resources for tasks within August 2010, by using task priority to resolve conflicts.

Sub LevelOverallocatedResources() 
 LevelingOptionsEx Order:=pjLevelPriority, LevelEntireProject:=False, _ 
 FromDate:="8/1/2010", ToDate:="8/31/2010" 
 LevelNow (False) 
End Sub