ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Series (https://www.excelbanter.com/excel-programming/297491-data-series.html)

bill

Data Series
 
How can I count the number of data series in an individual chart using VBA? Thanks

Bernie Deitrick

Data Series
 
Bill

ActiveChart.SeriesCollection.Count

You can replace ActiveChart with any valid chart object.

HTH,
Bernie
MS Excel MVP

"Bill" wrote in message
...
How can I count the number of data series in an individual chart using

VBA? Thanks



bill

Data Series
 
I have tried that before and I tried it again. However it says "Count method of SeriesCollection class failed". Any more ideas

----- Bernie Deitrick wrote: ----

Bil

ActiveChart.SeriesCollection.Coun

You can replace ActiveChart with any valid chart object

HTH
Berni
MS Excel MV

"Bill" wrote in messag
..
How can I count the number of data series in an individual chart usin

VBA? Thank




Bernie Deitrick

Data Series
 
Bill,

A lot of chart stuff only works on on a selected chart: try selecting the
chart first. For a test, select a chart (click on it so that its handles
show), then run this

Sub Test()
Msgbox ActiveChart.SeriesCollection.Count
End Sub

HTH,
Bernie


"Bill" wrote in message
...
I have tried that before and I tried it again. However it says "Count

method of SeriesCollection class failed". Any more ideas?


----- Bernie Deitrick wrote: -----

Bill

ActiveChart.SeriesCollection.Count

You can replace ActiveChart with any valid chart object.

HTH,
Bernie
MS Excel MVP

"Bill" wrote in message
...
How can I count the number of data series in an individual chart

using
VBA? Thanks






bill

Data Series
 
That works and I have subsequently solved the problem. thanks

----- Bernie Deitrick wrote: -----

Bill,

A lot of chart stuff only works on on a selected chart: try selecting the
chart first. For a test, select a chart (click on it so that its handles
show), then run this

Sub Test()
Msgbox ActiveChart.SeriesCollection.Count
End Sub

HTH,
Bernie


"Bill" wrote in message
...
I have tried that before and I tried it again. However it says "Count

method of SeriesCollection class failed". Any more ideas?
----- Bernie Deitrick wrote: -----

Bill
ActiveChart.SeriesCollection.Count
You can replace ActiveChart with any valid chart object.
HTH,

Bernie
MS Excel MVP
"Bill" wrote in message

...
How can I count the number of data series in an individual chart

using
VBA? Thanks



All times are GMT +1. The time now is 09:11 AM.

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