ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   finding chart series low (https://www.excelbanter.com/excel-programming/362085-finding-chart-series-low.html)

Paul

finding chart series low
 
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

Tom Ogilvy

finding chart series low
 
try taking the values off the end

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


--
Regards,
Tom Ogilvy


"Paul" wrote:

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


Paul

finding chart series low
 
Thanks Tom,

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

"Tom Ogilvy" wrote:

try taking the values off the end

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


--
Regards,
Tom Ogilvy


"Paul" wrote:

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


Jon Peltier

finding chart series low
 
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
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______

"Paul" wrote in message
...
Thanks Tom,

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

"Tom Ogilvy" wrote:

try taking the values off the end

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


--
Regards,
Tom Ogilvy


"Paul" wrote:

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





All times are GMT +1. The time now is 01:08 AM.

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