Share via


Flagn Property

True if the flag associated with an assignment, resource, or task is set. The n placeholder can be a number from 1 to 20. Read/write Boolean.

Example

Sub DeleteNonEssentialTasks()

    Dim T As Task   ' Task object used in For Each loop

    ' Delete nonessential tasks in the active project.
    For Each T In ActiveProject.Tasks
        If Not (T Is Nothing) Then
            If T.Flag1 = True Then T.Delete
        End If
    Next T
    
End Sub

Applies to | Assignment Object, Assignments Collection Object | Resource Object, Resources Collection Object | Task Object, Tasks Collection Object