ErrorBars object (Excel)
Represents the error bars in a chart series.
Remarks
Error bars indicate the degree of uncertainty for chart data. Only series in area, bar, column, line, and scatter groups on a 2D chart can have error bars. Only series in scatter groups can have x and y error bars. This object isn't a collection. There's no object that represents a single error bar; you either have x error bars or y error bars turned on for all points in a series or you have them turned off.
The ErrorBar method of the Series object changes the error bar format and type.
Example
Use the ErrorBars property of the Series object to return the ErrorBars object. The following example turns on error bars for series one in embedded chart one, and then sets the end style for the error bars.
Worksheets("sheet1").ChartObjects(1).Activate
ActiveChart.SeriesCollection(1).HasErrorBars = True
ActiveChart.SeriesCollection(1).ErrorBars.EndStyle = xlNoCap
Methods
Properties
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.