Table of contents
TOC
Collapse the table of content
Expand the table of content

Task.Milestone Property (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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."

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
© 2018 Microsoft