Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.38 KB

Project.Task.ConstraintType.md

File metadata and controls

53 lines (35 loc) · 1.38 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Task.ConstraintType property (Project)
vbapj.chm131667
vbapj.chm131667
project-server
Project.Task.ConstraintType
cdcd6a0d-a996-646d-130e-1a5ed2c93705
06/08/2017
medium

Task.ConstraintType property (Project)

Gets or sets a constraint type for a task. Read/write Variant.

Syntax

expression. ConstraintType

expression A variable that represents a Task object.

Remarks

The ConstraintType property can be one of the PjConstraint constants.

If you set the ConstraintType property to pjFNET, pjFNLT, pjMFO, pjMSO, pjSNET, or pjSNLT, Project uses the constraint date for the task. To set the constraint date, use the ConstraintDate property.

Example

The following example changes the constraint type of tasks from MSO and MFO to SNET and FNLT.

Sub ChangeConstraintTypes() 
    Dim T As Task ' Task object used in For Each loop 
 
    For Each T In ActiveProject.Tasks 
        If T.ConstraintType = pjMSO Then 
            T.ConstraintType = pjSNET 
        ElseIf T.ConstraintType = pjMFO Then 
            T.ConstraintType = pjFNLT 
        End If 
    Next T 
End Sub

[!includeSupport and feedback]