Have a look at some of the formatting in some of the built in Views for clues about how to set bar styles colours for Tasks that meet certain criteria. Some of the criteria can be combinations, eg "Summary,Critical". This one makes Summary bars which have zero Total Slack go whatever colour you like. Another good one is "Milestone, Critical", which can be used to make zero total slack Milestones go red. You have to get the syntax right with the comma etc.
If you use one of the custom fields such as Flag1 you could use a combination criteria such as "Normal, Flag1".
You could use this to make all normal tasks which also have Flag1 set to "Yes" take on whatever style you choose.
You could set Flag1 by data input or you could make it a calculated result with a formula.
when you make or contemplate serious formatting changes like this it is best to make it part of a new View rather than messing up the built in View.
Once you get the hang of using the spare custom fields you can also sort, filter and group on them, so they become really important.
My VBA is pretty hopeless but I find that so much can be achieved without it that I never need it.
Exhaust the possible simple solutions before over-reaching to the complicated ones.
Member for
18 years 8 months
Member for18 years8 months
Submitted by Glen Mettler on Mon, 2007-02-19 16:27
I use the flags, a text field I call Acro, and a cust task sheet view. The Acro field (short for Acronym) contains a short word that describes the task (ie "Conduct Thermal Test" would be "Therm Test" in Acro). I use the flag fields to indicate the type of symbol and where I want the label (left, right, top, bottom). I create a cust task sheet view to show in lower pane that displays the task, acro, dates, and flag fields (renamed as appropriate). In Bar Styles I create bars and indicators that correspond to the flags. I can then select the task and then select the flag in the task entry pane and the bar or symbol will display as appropriate and put the label either left, right, up, or down as approriate.
If you want, I can send you a project file and then we can talk on the phone. Two minutes of phone talk is much better than a couple of pages of written explanation.
Regards,
Glen
Member for
22 years 9 months
Member for22 years9 months
Submitted by Alexandre Faul… on Mon, 2007-02-19 15:25
You probably could write a macro or some sort of VB code to do as you require, but I think that youre over-complicating things a bit (but Im not particularly versed in the art of VB writing anyway)
I get the impression that youll be using the "Group By..." function in order to get the groupings that you desire. Once you have done this, then the easiest way is just to apply a filter (an Autofilter will work perfectly well), in Text1, to extract "retail" or "supply chain" values. You then just highlight all the activities, click Format>Bar>Bar Shape, and then change the colour.
Member for
18 years 8 monthsRE: Gantt Chart Bar Colour Coding
Thank you all for your help, I think Im more or less there now. Fingers crossed!
Member for
19 years 11 monthsRE: Gantt Chart Bar Colour Coding
James,
Have a look at some of the formatting in some of the built in Views for clues about how to set bar styles colours for Tasks that meet certain criteria. Some of the criteria can be combinations, eg "Summary,Critical". This one makes Summary bars which have zero Total Slack go whatever colour you like. Another good one is "Milestone, Critical", which can be used to make zero total slack Milestones go red. You have to get the syntax right with the comma etc.
If you use one of the custom fields such as Flag1 you could use a combination criteria such as "Normal, Flag1".
You could use this to make all normal tasks which also have Flag1 set to "Yes" take on whatever style you choose.
You could set Flag1 by data input or you could make it a calculated result with a formula.
when you make or contemplate serious formatting changes like this it is best to make it part of a new View rather than messing up the built in View.
Once you get the hang of using the spare custom fields you can also sort, filter and group on them, so they become really important.
My VBA is pretty hopeless but I find that so much can be achieved without it that I never need it.
Exhaust the possible simple solutions before over-reaching to the complicated ones.
Member for
18 years 8 monthsRE: Gantt Chart Bar Colour Coding
I use the flags, a text field I call Acro, and a cust task sheet view. The Acro field (short for Acronym) contains a short word that describes the task (ie "Conduct Thermal Test" would be "Therm Test" in Acro). I use the flag fields to indicate the type of symbol and where I want the label (left, right, top, bottom). I create a cust task sheet view to show in lower pane that displays the task, acro, dates, and flag fields (renamed as appropriate). In Bar Styles I create bars and indicators that correspond to the flags. I can then select the task and then select the flag in the task entry pane and the bar or symbol will display as appropriate and put the label either left, right, up, or down as approriate.
If you want, I can send you a project file and then we can talk on the phone. Two minutes of phone talk is much better than a couple of pages of written explanation.
Regards,
Glen
Member for
22 years 9 monthsRE: Gantt Chart Bar Colour Coding
James(s),
Add a text column in the Gantt Chart table and enter the "group" name for each task, as James describes
Go to Tools, Customize, Fields, and create a formula that says "if group = supply then indactor1 = yes" and so on for the other goup names
Go to Format, Bar Styles, and create new bars that represent "norma, critical, indicator1" and so on
This way, as soon as you select a particular group name for a task, the bar color will change accordingly.
Good work,
Alexandre
Member for
18 years 8 monthsRE: Gantt Chart Bar Colour Coding
Thanks for the help, does exactly what I need!
Member for
19 years 5 monthsRE: Gantt Chart Bar Colour Coding
Hi James,
You probably could write a macro or some sort of VB code to do as you require, but I think that youre over-complicating things a bit (but Im not particularly versed in the art of VB writing anyway)
I get the impression that youll be using the "Group By..." function in order to get the groupings that you desire. Once you have done this, then the easiest way is just to apply a filter (an Autofilter will work perfectly well), in Text1, to extract "retail" or "supply chain" values. You then just highlight all the activities, click Format>Bar>Bar Shape, and then change the colour.
HTH.
James.