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

Application.SetTPField Method (Project)

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

Sets a value for the percent complete field of one or more tasks in the Team Planner view.

Syntax

expression. SetTPField( ** Field, ** Value, ** AllSelectedTasks, ** Create, ** TaskID, ** ProjectName )

expression An expression that returns an Application object.

Parameters

NameRequired/OptionalData TypeDescription
FieldRequiredStringThe Field argument can be only "% Complete". You can also use the FieldConstantToFieldName method with pjTaskPercentComplete, as in the example.
ValueRequiredStringValue of the Field argument. Values can range from "0" to "100" for percent complete.
AllSelectedTasksOptionalBooleanNot used in Project. The value is True, which means that the Field and Value arguments are set for all selected tasks.
CreateOptionalBooleanNot used in Project.
TaskIDOptionalLongNot used in Project.
ProjectNameOptionalStringNot used in Project.

Return Value

Boolean

Example

The following example sets the selected tasks in the Team Planner view to 40% complete.

Sub TestSetTPField() 
    Dim fieldName As String 

    fieldName = FieldConstantToFieldName(pjTaskPercentComplete) 
    Application.SetTPField Field:=fieldName, Value:="40" 
End Sub
© 2018 Microsoft