Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colouring error bars in a chart
Hi, I have draw a chart which has three series on it. I want to colour the
error based on the series they belong to. When I record the process I get: ActiveSheet.ChartObjects("Chart 278").Activate ActiveChart.SeriesCollection(1).ErrorBars.Select With Selection.Border .LineStyle = xlContinuous .ColorIndex = 3 .Weight = xlThin End With Selection.EndStyle = xlNoCap So I have tried to work this into something which might work: With chtChart .SeriesCollection(1).ErrorBars.Select With Selection.Border .LineStyle = xlContinuous .ColorIndex = 3 .Weight = xlThin End With End With But this is giving me an error. Can anyone see what is wrong? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colouring error bars in a chart
Graham,
This should work: you need to work with the chartobject's chart, a step that isn't recorded by the macro recorder. With chtChart.Chart With .SeriesCollection(1).ErrorBars With .Border .LineStyle = xlContinuous .ColorIndex = 3 .Weight = xlThin End With End With End With HTH, Bernie MS Excel MVP "Graham Whitehead" wrote in message ... Hi, I have draw a chart which has three series on it. I want to colour the error based on the series they belong to. When I record the process I get: ActiveSheet.ChartObjects("Chart 278").Activate ActiveChart.SeriesCollection(1).ErrorBars.Select With Selection.Border .LineStyle = xlContinuous .ColorIndex = 3 .Weight = xlThin End With Selection.EndStyle = xlNoCap So I have tried to work this into something which might work: With chtChart .SeriesCollection(1).ErrorBars.Select With Selection.Border .LineStyle = xlContinuous .ColorIndex = 3 .Weight = xlThin End With End With But this is giving me an error. Can anyone see what is wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to add error bars into bar chart | Charts and Charting in Excel | |||
Customise error bars on individual bars in a bar chart 2007 | Charts and Charting in Excel | |||
How to add error bars to 3-D chart | Excel Discussion (Misc queries) | |||
Trendline for chart with error bars | Charts and Charting in Excel | |||
colouring in bars on a chart to correspond to quartiles | Excel Programming |