How to change font color based on a condition

A

Aman

Hi

In project, i want to change the font color of a cell based on a condition.
The pseudo code is something like:

if t.Start > t.Baseline1Start then
t.text4.fontcolor = pjRed
else
t.text4.fontcolor = pjBlue
end if

I tried many different ways, but quite obviously my project/vba skills are
not very proficient right now. Any help is appreciated.

Thanks
 
J

Jan De Messemaeker

Hi,

The Font method only works on the selected cell(s)
You should look up in the Object Browser (a button in your visual basic
editor, a wealth of information, when you know where this button is you are
a VBA specialist :))
- The relevant methods with Select in the name
- The Font method

HTH
 
M

Mike Glen

Hi Aman,

Welcome to this Microsoft Project newsgroup :)

I would have thought that you could do this within Project uasiong a
Customized field. You might like to have a look at my series on Microsoft
Project in the TechTrax ezine, particularly #14 & 15, at this site:
http://tinyurl.com/2xbhc or this:
http://pubs.logicalexpressions.com/Pub0009/LPMFrame.asp?CMD=ArticleSearch&AUTH=23
(Perhaps you'd care to rate the articles before leaving the site, :)
Thanks.)

FAQs, companion products and other useful Project information can be seen at
this web address: <http://www.mvps.org/project/>

Hope this helps - please let us know how you get on :)

Mike Glen
MS 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