Expand Minimize

Project.GetTaskIndexByGuid Method (Project)

Returns the local task identification number (ID) for the specified task.

expression .GetTaskIndexByGuid(TaskGuid)

expression A variable that represents a Project object.

Parameters

Name

Required/Optional

Data Type

Description

TaskGuid

Required

String

The GUID of the task.

Return Value

Long

The local task ID is the task index, which changes if the order of the task changes.

If the ID of the specified task is 6, the following function returns the value 6.

Function TestTaskId() As Long 
 TestTaskId = ActiveProject.GetTaskIndexByGuid("341A479D-73A5-4209-9366-8EA2B836255B") 
End Function
Show:
© 2014 Microsoft