Task.Milestone Property (Project)

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


expression. Milestone

expression A variable that represents a Task object.


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

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.Milestone = True 
 End If 
 Next T 
End Sub