View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Carlos[_2_] Carlos[_2_] is offline
external usenet poster
 
Posts: 9
Default Obtaining Series Name and X/Y Value Ranges for Charts

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

"Ed Hamilton" wrote in message
et...
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