I have a code in excel to change colors of bar graph but its not working. Can anyone suggest me what I am doing wrong in the code.
With ActiveChart.SeriesCollection(1).Interior.Color = RGB(0, 153, 64)
End With
This code doesnt affect color of the bar.
Also, For all bars (representing values 0 to 200) I want one color (green) but for two bars representing two data points (100 and 200), I want to add different color. Can anyone please tell me how to to that with VBA. I would appreciate your time regarding the same.
Thanks Very much
The With statement specifies the objects or properties to be acted on. Your code should be like this:
EDIT - For the 2nd part of your question: