![]() |
Changing the colour of a bar on a chart
I have created a column chart and am now trying to change the colour of one
of the bars. Here is the code I am using: With chtChart ActiveChart.SeriesCollection(1).Points(2).Select With Selection.Interior .ColorIndex = 3 .Pattern = xlSolid End With End With But to an avail. can anyone see what is wrong with it? |
Changing the colour of a bar on a chart
try
ActiveSheet.ChartObjects(1).Activate With chtChart ActiveChart.SeriesCollection(1).Points(2).Select With Selection.Interior .ColorIndex = 3 .Pattern = xlSolid End With End With |
Changing the colour of a bar on a chart
That code should work though "With chtChart..End With" does nothing in your
useage. You don't need to select the chart With ActiveSheet.ChartObjects(1).Chart .SeriesCollection(1).Points(2).Interior.ColorIndex = 3 End With Regards, Peter T "Graham Whitehead" wrote in message ... I have created a column chart and am now trying to change the colour of one of the bars. Here is the code I am using: With chtChart ActiveChart.SeriesCollection(1).Points(2).Select With Selection.Interior .ColorIndex = 3 .Pattern = xlSolid End With End With But to an avail. can anyone see what is wrong with it? |
All times are GMT +1. The time now is 11:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com