Sub allgreen() 'This macro shows how to set a barstyle depending on a certain 'value in the text5 field. Right now the case statement is 'commented out, so it will make all of your tasks green 'If you comment out the green line, this macro is useful 'to clear any custom formatting that you may have applied to 'specific tasks. 'Copyright Jack Dahlgren, Feb. 2002 Dim t As Task For Each t In ActiveProject.Tasks 'Select Case LCase(t.Text5) 'Case "gn" GanttBarFormat TaskID:=Task.ID, Reset:=True 'comment out this line if you don't want all the tasks green GanttBarFormat TaskID:=Task.ID, MiddleColor:=pjGreen, StartColor:=pjGreen, EndColor:=pjGreen 'Case Else 'End Select Next Task End Sub