Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to set Graphical Indicator

Status
Not open for further replies.

mystuff

Programmer
Apr 30, 2004
86
US
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?

 
Never mind ... it seams to be working now.
 
Never mind AGAIN -- it is not working. Please help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top