ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Extracting Error bar definition (https://www.excelbanter.com/charts-charting-excel/127347-extracting-error-bar-definition.html)

Barb Reinhardt

Extracting Error bar definition
 
I'd like to programmatically extract the error bar definition for a bunch of
series within a chart. I can get the series formula using

..SeriesCollection(k).Formula

What do I need to use to get the error bar definition?

Thanks

Jon Peltier

Extracting Error bar definition
 
This is not possible in VBA, at least not without using SendKeys*. VBA
cannot read the values of the error bars, and doesn't even know there are
separate X and Y error bars in an XY chart. In the UI you can select the X
and Y error bars and format them separately, but VBA only has an ErrorBars
property, and therefore must format X and Y error bars identically.

*You could use the much maligned (and deservedly so) SendKeys method to
select the data range for the error bars in the error bar dialog's input
boxes. I've never been desperate enough to try this.

Obviously there's room for improvement.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Barb Reinhardt" wrote in message
...
I'd like to programmatically extract the error bar definition for a bunch
of
series within a chart. I can get the series formula using

.SeriesCollection(k).Formula

What do I need to use to get the error bar definition?

Thanks




Barb Reinhardt

Extracting Error bar definition
 
Thanks so much! < /sarcasm I had a feeling that was it.

"Jon Peltier" wrote:

This is not possible in VBA, at least not without using SendKeys*. VBA
cannot read the values of the error bars, and doesn't even know there are
separate X and Y error bars in an XY chart. In the UI you can select the X
and Y error bars and format them separately, but VBA only has an ErrorBars
property, and therefore must format X and Y error bars identically.

*You could use the much maligned (and deservedly so) SendKeys method to
select the data range for the error bars in the error bar dialog's input
boxes. I've never been desperate enough to try this.

Obviously there's room for improvement.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Barb Reinhardt" wrote in message
...
I'd like to programmatically extract the error bar definition for a bunch
of
series within a chart. I can get the series formula using

.SeriesCollection(k).Formula

What do I need to use to get the error bar definition?

Thanks





Jon Peltier

Extracting Error bar definition
 
VBA cannot even distinguish between X and Y error bars when formatting. They
didn't hook up error bars into the object model very tightly.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Barb Reinhardt" wrote in message
...
Thanks so much! < /sarcasm I had a feeling that was it.

"Jon Peltier" wrote:

This is not possible in VBA, at least not without using SendKeys*. VBA
cannot read the values of the error bars, and doesn't even know there are
separate X and Y error bars in an XY chart. In the UI you can select the
X
and Y error bars and format them separately, but VBA only has an
ErrorBars
property, and therefore must format X and Y error bars identically.

*You could use the much maligned (and deservedly so) SendKeys method to
select the data range for the error bars in the error bar dialog's input
boxes. I've never been desperate enough to try this.

Obviously there's room for improvement.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Barb Reinhardt" wrote in
message
...
I'd like to programmatically extract the error bar definition for a
bunch
of
series within a chart. I can get the series formula using

.SeriesCollection(k).Formula

What do I need to use to get the error bar definition?

Thanks








All times are GMT +1. The time now is 01:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com