Task.Milestone Property

Project Developer Reference

True if the task is a milestone. Read/write Variant.

Syntax

expression.Milestone

expression   A variable that represents a Task object.

Example
The following example marks as milestones any tasks in the active project with names that begin with the word "Inspection."

Visual Basic for Applications
  Sub MarkInspectionTasks()
Dim T As Task ' Task object used in For Each loop
Dim MilestoneName As String
Dim NameLength As Integer

MilestoneName = "Inspection"
NameLength = Len(MilestoneName)

For Each T In ActiveProject.Tasks
    ' If the task's name begins with Inspection, it's a milestone.
    If UCase(Left(T.Name, NameLength)) = UCase(MilestoneName) Then
        T.<strong class="bterm">Milestone</strong> = True
    End If
Next T

End Sub

See Also