Task.FreeSlack Property

Project Developer Reference

Returns the free slack for a task in minutes. Read-only Variant.

Syntax

expression.FreeSlack

expression   A variable that represents a Task object.

Example
The following example eliminates free slack in the active project by changing the start dates of tasks with free slack.

Visual Basic for Applications
  Sub EliminateFreeSlack()
Dim T As Task ' Task object used in For Each loop

For Each T In ActiveProject.Tasks
    If T.<strong class="bterm">FreeSlack</strong> &gt; 0 Then
        T.Start = Application.DateAdd(T.Start, T.<strong class="bterm">FreeSlack</strong>)
    End If
Next T

End Sub

See Also