S
sxinkang
Dear All,
I am new to project VBA. I am working with project 2000 and trying to do
conditional formatting according to Values of Finish column. However, when it
points to one row's Finish value, it changes the color of another row. Main
code is as below.
************************************************
Dim tskT As Task
Dim diff As Integer
For Each tskT In ActiveProject.Tasks
SelectRow Row:=tskT.ID, rowrelative:=False
diff = DateValue(tskT.Finish) - DateValue(Date)
Select Case diff
Case Is > 0
Font Color:=pjRed
Case Is = 0
Font Color:=pjBlue
Case Is < 0
Font Color:=pjGreen
End Select
Next tskT
********************************************
Any advice or suggestion will be really appreciated!
I am new to project VBA. I am working with project 2000 and trying to do
conditional formatting according to Values of Finish column. However, when it
points to one row's Finish value, it changes the color of another row. Main
code is as below.
************************************************
Dim tskT As Task
Dim diff As Integer
For Each tskT In ActiveProject.Tasks
SelectRow Row:=tskT.ID, rowrelative:=False
diff = DateValue(tskT.Finish) - DateValue(Date)
Select Case diff
Case Is > 0
Font Color:=pjRed
Case Is = 0
Font Color:=pjBlue
Case Is < 0
Font Color:=pjGreen
End Select
Next tskT
********************************************
Any advice or suggestion will be really appreciated!