Application.SelectTPTask method (Project)

Selects the specified task in the Team Planner view.


expression. SelectTPTask( _TaskUniqueID_ )

expression An expression that returns an Application object.


Name Required/Optional Data type Description
TaskUniqueID Optional Variant Unique ID of the task to select.

Return value



If the Team Planner view is not open, the SelectTPTask method generates run-time error 1100, "The method is not available in this situation."


The following example selects two tasks in the Team Planner view. Task 5 remains selected after task 7 is selected.

Sub SelectTwoTasks()
    SelectTPTask (5)
    SelectTPTask (7)
End Sub

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.