Changing Color of Text in Cell using VB

M

Marian

I am looping through each non-summary task and setting
the Text10 field based upon some evaluation. I want the
ability to change the color of the text put in the Text10
field to say red, green, etc.

I am unsure how to access the text in the field and
change it to a different color?

Any help is greatly appreciated.

Marian
 
J

Jan De Messemaeker

Hi Marian,

First, as an introduction, do you know the object browser in the VB Editor?
To solve your problem, I just typed select and found what seems the best way
to do what you want.
I'm glad I can help through this NG, but it would be lightyears faster for
you if you could lookup things for yourself.

So far for the preaching by the old man.

Now try this

FilterApply "All Tasks"
Outlineshowalltasks
'These two to make sure taskID is also Row number
Selecttaskcell (for the parameters see the help below)

SelectTaskCell Method


Selects a cell containing task information.

Syntax

expression.SelectTaskCell(Row, Column, RowRelative)

expression Optional. An expression that returns an Application object.

Row Optional Long. The row number (RowRelative is False) or the relative
row position (RowRelative is True) of the cell to select.

Column Optional String. The field name of the cell to select.

RowRelative Optional Boolean. True if the row number is relative to the
active cell. The default value is True.

Remarks

Using the SelectTaskCell method without specifying any arguments retains the
current cell as the active cell.

The SelectTaskCell method is only available when the Gantt Chart, Task
Sheet, or Task Usage view is the active view.


Hope this helps,

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
 

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