Share via


Task.Critical Property

Project Developer Reference

True if the task is on the critical path. Read-only Variant.

Syntax

expression.Critical

expression   A variable that represents a Task object.

Example
The following example sets the highest priority for critical tasks in the active project.

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

For Each T In ActiveProject.Tasks
    If T.<strong class="bterm">Critical</strong> Then T.Priority = pjPriorityHighest
Next T

End Su

See Also