title | keywords | f1_keywords | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|---|
Application.SetTPField method (Project) |
vbapj.chm1513 |
|
project-server |
|
66867c0a-e5a7-9492-463b-0cb955f020df |
06/08/2017 |
medium |
Sets a value for the percent complete field of one or more tasks in the Team Planner view.
expression. SetTPField
( _Field_
, _Value_
, _AllSelectedTasks_
, _Create_
, _TaskID_
, _ProjectName_
)
expression An expression that returns an Application object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Field | Required | String | The Field argument can be only "% Complete". You can also use the FieldConstantToFieldName method with pjTaskPercentComplete, as in the example. |
Value | Required | String | Value of the Field argument. Values can range from "0" to "100" for percent complete. |
AllSelectedTasks | Optional | Boolean | Not used in Project. The value is True, which means that the Field and Value arguments are set for all selected tasks. |
Create | Optional | Boolean | Not used in Project. |
TaskID | Optional | Long | Not used in Project. |
ProjectName | Optional | String | Not used in Project. |
Boolean
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
[!includeSupport and feedback]