I am using automation to send data from Access to Excel to populate various simple bar chart graphs. The X axis is set as various Departments using either a two or three digit abbreviation.
Users want to be able to set a specific color by Department or better yet, have the ability to change the color by Dept and have it applied to all of the graphs.
I have been able to change various parts of the graphs using vba code form the data series, labels, and other parameters, but for the life of me, can’t figure out how to change the darn colors on the bars themselves.
Using code similar to the following I figured I could get the color to change but it will not work. Any ideas – Since the departments are always in the same order, Pont 4 for this example should be red.
Xlapp.ActiveSheet.ChartObjects(10).activate
… doing various formatting on chart 10
XlApp.ActiveChart.SeriesCollection(1).Points(4).Interior.ColorIndex = 255 ‘(or VbRed or any other color fails)
… end statement