Obtaining Series Name and X/Y Value Ranges for Charts

  • Thread starter Thread starter Ed Hamilton
  • Start date Start date
E

Ed Hamilton

In a VB application I'm trying to obtain the x and y data ranges for each
member of the seriescollection on a floating chart.

In my test case I can identify all the way down to the
SeriesCollection.count and then identify each of the four series by name
(Q1,Q2,Q3,Q4). I thought I had the code for obtaining the values of the
Series but keep getting an error.

The code I can't get is:

ActiveChart.SeriesCollection(1).xvalues

and it passes the "Run-time error '13': Type Mismatch"

Any ideas would be appreciated as it seems this is the correct code.

Ed
 
To retrive info of a serie use .Formula properties
E.g.
With ActiveChart.SeriesCollection(serienumber)

FormulaSrs = .Formula
iNmBgn = InStr(FormulaSrs, "(") + 1
FormulaSrs = Mid(FormulaSrs, iNmBgn, Len(FormulaSrs) - iNmBgn)
DataChart = Split(FormulaSrs, ",")
SerieName=DataChart (0)
xValues=DataChart (1)
yValues=DataChart (2)
PlotOrder=DataChart (3)
end with
 
Back
Top