Task Bar Colour Changes

D

DTB

Does anyone have a VBA Script written that will change the
colour of the task's bar based on what resource it has
associated with it?

For instance, I would like to have all the bars for
Mechanical Maintenance to be blue;
Electrical Maintenance to be green;
Operations to be Magenta;... etc...

I appreciate any help.

Darcey.
 
J

Jack D.

DTB said:
Does anyone have a VBA Script written that will change the
colour of the task's bar based on what resource it has
associated with it?

For instance, I would like to have all the bars for
Mechanical Maintenance to be blue;
Electrical Maintenance to be green;
Operations to be Magenta;... etc...

I appreciate any help.

Darcey.

Look on my website for the "all green" macro.
Edit it with some additional conditions (I recommend a select case
statement)
where task.resourcenames contains "Mechanical Maintenance" then set the bar
blue etc.
You still have to figure out what you do when you have more than one
resource on a task.

An alternative is to use a custom formula in flag fields and then have the
bar styles dependent on the flag field. That will work if you have less than
20 types of resources and allows multiple bars per task.


--
Please try to keep replies in this group. I do check e-mail, but only
infrequently. For Macros and other things check http://masamiki.com/project

-Jack Dahlgren, Project MVP


+++++++++++++++++++
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top