Application.LevelingOptionsEx method (Project)

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

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, choose Leveling Options.

Using the LevelingOptionsEx method with no 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 2012, by using task priority to resolve conflicts.

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.