finding chart series low

G

Guest

I am trying to get vba to give me the low value of the chart series; but the
error message says "object does not support this property or method" in the
line starting with With"

What did i do to deserve this???

:))

Sub LOWOFSERIES()
Dim XXX As Variant
Dim POINT As Long
With ActiveSheet.ChartObjects("Chart 964").SeriesCollection(5).Values
XXX = .Values
POINT = lBound(XXX)
End With
MsgBox POINT
End Sub
 
G

Guest

try taking the values off the end

With ActiveSheet.ChartObjects("Chart 964").SeriesCollection(5)
XXX = .Values
End With
POINT = lBound(XXX)
 
G

Guest

Thanks Tom,

Tried that, but it still comes up with the same error message on the with
line.
 
J

Jon Peltier

With ActiveSheet.ChartObjects("blah blah").Chart.SeriesCollection(5)

Also, LBound will return 1, the index of the first element of the array. To
get the series minimum, you could loop through the array of values ( your
variable XXX) and determine the lowest value, or you could take the slight
performance hit and use

Ymin = WorksheetFunction.Min(XXX)

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top