Application.SetTaskFieldByID method (Project)
Sets the value of a task field specified by the field identification number.
Syntax
expression. SetTaskFieldByID
( _FieldID_
, _Value_
, _AllSelectedTasks_
, _Create_
, _TaskID_
, _ProjectName_
)
expression An expression that returns an Application object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
FieldID | Required | PjField | Field identification number. Can be one of the task fields specified by a PjField constant or a number returned by the FieldNameToFieldConstant method. |
Value | Required | String | The value of the task field. |
AllSelectedTasks | Optional | Variant | True if the value of the field is set for all selected tasks. False if the value is set for the active task. The default value is False. |
Create | Optional | Variant | True if Project creates a task when the active cell is on an empty row. The default value is True. |
TaskID | Optional | Variant | The identification number of the task containing the field to set. If AllSelectedResources is True, TaskID is ignored. |
ProjectName | Optional | Variant | If the active project is a consolidated project, specifies the name of the project for the task specified by TaskID. If TaskID is not specified, ProjectName is ignored. The default value is the name of the active project. |
Return value
Boolean
Remarks
To set a task field by name, use the SetTaskField method.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.