I'm trying to change the colors for the bars on the bar graph. In the design view I can only change 4 bars, but my graph has 6 bars. How do I go about changing the other bars on the graph?
Change bar color on bar graph
Collapse
X
-
I don't understand why you can't change the other 2 bars. It does not make sense. You need to provide more details. You are welcome to try the following vba code and see if that helps. Replace illustrative objects (YourChartConta inerObject/YourChartObject ) with your actual objects.Originally posted by dmorandI'm trying to change the colors for the bars on the bar graph. In the design view I can only change 4 bars, but my graph has 6 bars. How do I go about changing the other bars on the graph?
Code:Private Sub Form_Open(Cancel As Integer) With Me.YourChartContainerObject.YourChartObject .SeriesCollection(1).Interior.Color = RGB(255, 128, 128) 'peach .SeriesCollection(2).Interior.Color = RGB(0, 255, 128) 'green .SeriesCollection(3).Interior.Color = RGB(0, 128, 255) 'blue .SeriesCollection(4).Interior.Color = RGB(128, 255, 255) 'turquoise .SeriesCollection(5).Interior.Color = RGB(255, 255, 128) 'yellow .SeriesCollection(0).Interior.Color = RGB(255, 0, 255) 'magenta End With End Sub
Comment