I recorded a macro to set a graphical indicator of a field. If the value is "Red", a red stoplight will show; Same with a value of "Green" and "Yellow". This works fine when I set it manually. However, when I play the macro, The graphical indicator does not show (nothing shows). However, when I go into customize and select values, the "words" show up. Then when I go back into customize and into graphical indicators, I see the indicators that were set. If I click OK twice, they appear. Here is what the macro looks like:
Sub color()
' Macro color
' Macro Recorded Fri 11/5/04 by Susie Shaffer.
SelectTaskColumn Column:="Text2"
CustomFieldIndicators FieldID:=pjCustomTaskText2, SummaryInheritsNonsummary:=True, ProjectInheritsSummary:=True, ShowToolTips:=True
CustomFieldIndicatorAdd FieldID:=pjCustomTaskText2, Test:=pjCompareEquals, Value:="Red", IndicatorID:=pjIndicatorSphereRed
CustomFieldIndicatorAdd FieldID:=pjCustomTaskText2, Test:=pjCompareEquals, Value:="Yellow", IndicatorID:=pjIndicatorSphereYellow
CustomFieldIndicatorAdd FieldID:=pjCustomTaskText2, Test:=pjCompareEquals, Value:="Green", IndicatorID:=pjIndicatorSphereLime
CustomFieldProperties FieldID:=pjCustomTaskText2, Attribute:=pjFieldAttributeNone, SummaryCalc:=pjCalcNone, GraphicalIndicators:=True, Required:=False
End Sub
Any idea why?
Sub color()
' Macro color
' Macro Recorded Fri 11/5/04 by Susie Shaffer.
SelectTaskColumn Column:="Text2"
CustomFieldIndicators FieldID:=pjCustomTaskText2, SummaryInheritsNonsummary:=True, ProjectInheritsSummary:=True, ShowToolTips:=True
CustomFieldIndicatorAdd FieldID:=pjCustomTaskText2, Test:=pjCompareEquals, Value:="Red", IndicatorID:=pjIndicatorSphereRed
CustomFieldIndicatorAdd FieldID:=pjCustomTaskText2, Test:=pjCompareEquals, Value:="Yellow", IndicatorID:=pjIndicatorSphereYellow
CustomFieldIndicatorAdd FieldID:=pjCustomTaskText2, Test:=pjCompareEquals, Value:="Green", IndicatorID:=pjIndicatorSphereLime
CustomFieldProperties FieldID:=pjCustomTaskText2, Attribute:=pjFieldAttributeNone, SummaryCalc:=pjCalcNone, GraphicalIndicators:=True, Required:=False
End Sub
Any idea why?