Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.23 KB

Project.Application.LinkTasks.md

File metadata and controls

65 lines (43 loc) · 1.23 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.LinkTasks method (Project)
vbapj.chm210
vbapj.chm210
project-server
Project.Application.LinkTasks
cc41c963-533c-97bf-8301-388bb2aaf746
06/08/2017
medium

Application.LinkTasks method (Project)

Links the selected tasks in the Gantt Chart, Calendar, Task Sheet, or Task Usage view.

Syntax

expression. LinkTasks

expression A variable that represents an Application object.

Return value

Boolean

Example

The following example a couple of tasks and links them.

Sub Link_Tasks() 
 
 'Activate Task Sheet view 
 ViewApply Name:="Task Sheet" 
 
 ' Create a coupe of tasks 
 RowInsert 
 SetTaskField Field:="Name", Value:="TestTask-2" 
 SetTaskField Field:="Duration", Value:="5" 
 
 RowInsert 
 SetTaskField Field:="Name", Value:="TestTask-1" 
 SetTaskField Field:="Duration", Value:="10" 
 
 'Select tasks 
 SelectRow 
 SelectRow Row:=1, Add:=True 
 
 'Link the two tasks 
 LinkTasks 
 
 'delete the tasks 
 ActiveProject.Tasks("TestTask-1").Delete 
 ActiveProject.Tasks("TestTask-2").Delete 
End Sub

[!includeSupport and feedback]