It's well known in Microsoft Project VBA how to change the color of a task bar using typically:
GanttBarFormatEx TaskID:= CurrentId, GanttStyle:=7, MiddleColor:= myColor
However... i'm looking for a property to get the actual color instead than changing it. I looked into the Microsoft Project VBA reference but failed to found any information.
Thanks for your help
CodePudding user response:
Vincent, Unlike Excel Project doesn't expose the ability to read format colors be they in text or for Gantt Bars. What I normally do is use a indirect method which is to uncover the criteria that set the color and thereby deduce the displayed color. If the color was set by the whim of the user, you're stuck, but normally that user set some criteria (e.g. field value or combination of field values) and you can test for that.