View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.charting
MikeM MikeM is offline
external usenet poster
 
Posts: 64
Default Elementary(?) GetChartElement Question

MouseDown: Each point represents a month (Jan 1960 is the first month).

Private Sub myChartClass_MouseDown(ByVal Button As Long, ByVal Shift As
Long, ByVal x As Long, ByVal Y As Long)
Dim kMo As Long, kYr As Long, iPt As Long
ActiveChart.GetChartElement x, Y, kMo, kYr, iPt
If kMo = 3 Then
kMo = (iPt - 1) Mod 12 + 1
kYr = Int((iPt - 0.9) / 12) + 1960
Sheets("Sheet1").CheckDate (kMo & "/" & kYr)
End If
End Sub

"Jon Peltier" wrote:

What event are you trapping to get X and Y?

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



MikeM wrote:
I plot a time series and want to record the specific date of a point. Using
the mouse and GetChartElement, I select the point, determine that the
ElementID is 3 and that I have selected the correct SeriesIndex. However,
PointIndex, the fifth argument in GetChartElement, returns as -1, showing
that the entire series has been selected. How can I determine the point
number?

TIA,
Mike