Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Project color rolled up taskbar

Status
Not open for further replies.

wevens

Programmer
Mar 9, 2004
2
FR
Hi, does anybody know how you can change the bar color of an individual rolled up task by means of VB?

More specific: Suppose you have two tasks after each other rolled up to a main task. The main task will now show 2 bars on the same line. How can the color of one of these bars be changed? (It can be done manually!)

To change the bar color of a normal task, I use code like this:
activeproject.Tasks.Application.GanttBarFormat(taskid:=4,middlecolor:=pjgreen)
 
(solution provided by Gérard Ducouret)

Refer to the subtask with this code:

GanttBarFormat TaskId:=x,GanttStyle:=y, MiddleColor:=z

x=TaskID
y=style number of the rolled up bar (see bar styles: default = 5)
z=predefined color (e.g. pjGreen)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top