S
SonT
Please tell me why I get "Run-time error '91'
Sub Macro10()
Dim b As Integer
b = ActiveProject.Tasks.Count
For b = b To 1 Step -1
SelectCell Row:=b, Column:=5, RowRelative:=False
If ActiveCell.Task.Type = 1 Then ActiveCell.CellColor = pjRed
If ActiveCell.Task.Type = 2 Then ActiveCell.CellColor = pjColorAutomatic
If ActiveCell.Task.Type = 3 Then ActiveCell.CellColor = pjColorAutomatic
If ActiveCell.Task.Type = 0 Then ActiveCell.CellColor = pjColorAutomatic
Next b
End Sub
Thank you.
Sub Macro10()
Dim b As Integer
b = ActiveProject.Tasks.Count
For b = b To 1 Step -1
SelectCell Row:=b, Column:=5, RowRelative:=False
If ActiveCell.Task.Type = 1 Then ActiveCell.CellColor = pjRed
If ActiveCell.Task.Type = 2 Then ActiveCell.CellColor = pjColorAutomatic
If ActiveCell.Task.Type = 3 Then ActiveCell.CellColor = pjColorAutomatic
If ActiveCell.Task.Type = 0 Then ActiveCell.CellColor = pjColorAutomatic
Next b
End Sub
Thank you.