Need some help with a conditional format. I have two fields I would like to evaluate. I have a Due Data and a % Complete. I would like to have an If Due Date > Date() and % Complete <100 Font = Red type thing. I am starting with this piece of code I pulled from a site however the % Complete does not work because of the % character. I tried to [%Complete] but that did not work either.
So my question #1 Is how do I indicate the % Complete field in my code?
#2 Is how do I add the If Statements after this? I am thinking I want this to run then come back and run the ifs on the Due date stuff?????
Sub SelectTaskRows()
Dim tskT As Task
For Each tskT In ActiveProject.Tasks
Select Case tskT.% Complete
Case 1 To 50
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjYellow
Case 51 To 90
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjBlue
Case Is < 1
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjred
Case Is > 90
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjGreen
End Select
Next tskT
End Sub
Thanks for any help!
So my question #1 Is how do I indicate the % Complete field in my code?
#2 Is how do I add the If Statements after this? I am thinking I want this to run then come back and run the ifs on the Due date stuff?????
Sub SelectTaskRows()
Dim tskT As Task
For Each tskT In ActiveProject.Tasks
Select Case tskT.% Complete
Case 1 To 50
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjYellow
Case 51 To 90
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjBlue
Case Is < 1
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjred
Case Is > 90
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjGreen
End Select
Next tskT
End Sub
Thanks for any help!