resource name determines font color for row

V

Vacation's Over

I'm new to Project but very familliar with Excel & VBA

I have not found a conditional formatting ability in Project.

What I would like help on is getting the Gantt chart view to color code the
task fonts based on the resource name assigned to the task.

I would need to toggle this on and off.

Thanks in advance
 
J

John

Vacation's Over said:
I'm new to Project but very familliar with Excel & VBA

I have not found a conditional formatting ability in Project.

What I would like help on is getting the Gantt chart view to color code the
task fonts based on the resource name assigned to the task.

I would need to toggle this on and off.

Thanks in advance

Vacation's Over,
Since you posted in the developer newsgroup I assume you want a VBA
procedure to separately (and automatically) set the font color of the
task for each individual resource assigned.

I don't remember how it works in Excel, but in Project, font
characteristics can only be set in foreground processing (i.e. through
an active selection). I would use the following steps (shown here in
pseudo-code form). This assumes there is only one resource assigned to
each task.
1. For the toggle requirement, I would use a Msgbox to ask the user if
font coloring is desired. Depending on whether the file was saved with
the font coloring will determine whether the color needs to be re-set to
black.
2. I would probably set up an array to read and store all used resource
names (this will facilitate automating the next step). One way to do
this is to loop through all tasks and store the assigned resource.
3. Use the FilterEdit Method in a loop to separately filter the file for
each group of tasks for a given resource. Use the above array to set the
"value" for the filter on the Resource Names field
4. Use the SelectTaskColumn Method on the filtered set
5. Use the Font Method to set the color (the color selection could
either be set in a lookup table or simply cycle through the constants
for all the font colors).

That should do it.

John
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