Application.LevelingOptions method (Project)
Specifies leveling options for the active project.
Syntax
expression. LevelingOptions
( _Automatic_
, _DelayInSlack_
, _AutoClearLeveling_
, _Order_
, _LevelEntireProject_
, _FromDate_
, _ToDate_
, _PeriodBasis_
, _LevelIndividualAssignments_
, _LevelingCanSplit_
, _LevelProposedBookings_
)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Automatic | Optional | Boolean | True if Project automatically levels tasks in the active project. |
DelayInSlack | Optional | Boolean | True if the active project can be leveled only within the available slack time. False if the project can be delayed in order to level resources. |
AutoClearLeveling | Optional | Boolean | True if Project clears old leveling values before leveling. |
Order | Optional | Long | A constant that specifies how Project should resolve resource conflicts when leveling tasks in the active project. Can be one of the PjLevelOrder constants. |
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. |
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 | Long | Specifies how often Project should look for overallocated resources. Can be one of the PjLevelPeriodBasis constants. |
LevelIndividualAssignments | Optional | Boolean | True if leveling can adjust individual assignments on a task. |
LevelingCanSplit | Optional | Boolean | True if leveling can create splits in remaining work. |
LevelProposedBookings | Optional | Boolean | True if leveling includes proposed resource bookings. |
Return value
Boolean
Remarks
If an argument is omitted, its default value is specified by the current setting in the Resource Leveling dialog box.
Using the LevelingOptions method without specifying any arguments displays the Resource Leveling dialog box.
To include manually scheduled tasks in the leveling options, use the LevelingOptionsEx method.
Example
The following example levels resources in the application using priority to resolve conflicts.
Sub LevelOverallocatedResources()
LevelingOptions Order:=pjLevelPriority
LevelNow (True)
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.