« How to open MS Project from Excel | Main | The new PMBOK Guide »

Formatting Task Links in MS Project

Someone asked if it is possible to hide the dependency lines (links) in Microsoft Project. By going to the format menu and selecting "layout" you can turn them off for all tasks. But there is a workaround for formatting them individually which can hide or highlight links. To do this we rely on the behavior of project to use the first applicable barstyle as the one which controls the link color.

What this means is that if the first barstyle in the list applies to all tasks and is blue, then all the link lines are going to be blue. Since we can layer barstyles we can set the first barstyle to be one color and then overlay it with a different color. The link will take the first color and the task bar will take the color of the later style.

By using the conditional formatting capability of flags we can set this differently for different tasks and thus control the link color on an individual basis.

The first step is to set up some barstyles. In the screenshot you can see that I created white, red and green barstyles BEFORE the default blue barstyle. I use flags to control which tasks these barstyles are used for.

dependency-barstyles.jpg

Then we set the flags for the individual tasks. You can see below that the task with Flag1 set to Yes has a white link line with its successors. Likewise with the green and red link lines.

formatted-dependencies.jpg

Combining this with a custom field formula to set the value of the flag fields, you can programmatically change the color of the link lines in almost any manner you choose.

RELATED POSTS

Comments (2)

Doug_Help:

Conditional Links - Does anyone know how to accomplish the following:

I have a task E which is based upon a conditional link to other tasks. For example, the logic might be as follows:

Task E begins upon the earlier completion of either Task A or B.
Or
Task E begins upon the later completion of either Task C or D.

chen:

Thank you for the articles! They are very useful.

Except making customized task link or bar style in Gantt chart, I wonder if there is a way to make the same control in Calendar. The bar style in Calendar doesn't open the options to add new item (ex. new bar style for Flag). Any suggestion?

Best,
chen

Post a comment

(Comments are moderated to fight SPAM and will be published after I have a chance to approve them. Thanks for waiting.)

About

The previous article is How to open MS Project from Excel.

The next article is The new PMBOK Guide.

Current articles are in the main index page and you can find a complete list of articles in the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.34