Hello all. I am using chart events to highlight a series collection in a chart when the the mouse is clicked on a legend entry (courtesy of Peltiertech.com). In addition to highlighting the series I am also trying to find the maximum value in the highlighted series and add a label or highlight that point. I am a novice so I really just hope and poke around until I get it right. I am having problems returning the y axis value of a data point and was hoping someone could nudge me in the right direction. I have tried the following with many variations:
Private Sub FindMaxSeriesData()
Dim fmSeriesCount, old
fmSeriesCount = Me.SeriesCollection(Arg1).Points.Count
maxDataPoint = fmSeriesCount
old = fmSeriesCount
Do
fmSeriesCount = fmSeriesCount - 1
'Here is where I am having problems. I do not know how to return the value of the point.
If Me.SeriesCollection(Arg1).Points(fmSeriesCount).curryvalue > _
Me.SeriesCollection(Arg1).Points(old).curryvalue Then
maxDataPoint = fmSeriesCount
End If
Loop While fmSeriesCount <> 0
End Sub
Bookmarks