G
Garry
Hello all
Can anyone help with this one? I am using a subform in PivotChart view
and I want to retrieve the chart element clicked by the user.
In the subform I have the following piece of test code to retrieve the
XY mouse position and the type of chart element clicked and display
them on the container form:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Dim objPick As Object
Set objPick = Me.ChartSpace.RangeFromPoint(X, Y)
Parent!textx.value = X
Parent!texty.value = Y
Parent!textz.value = TypeName(objPick)
End Sub
Compiles OK, but trouble is, I can't get RangeFromPoint to work. X & Y
are displayed correctly, but the typename persistently comes back as
Nothing.
I know RangeFromPoint is supposed to work when the chart is an OWC
control, but why doesn't it work with a form in PivotChart view? Or
am I being stupid?
Thanks for any assistance
Garry
Can anyone help with this one? I am using a subform in PivotChart view
and I want to retrieve the chart element clicked by the user.
In the subform I have the following piece of test code to retrieve the
XY mouse position and the type of chart element clicked and display
them on the container form:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Dim objPick As Object
Set objPick = Me.ChartSpace.RangeFromPoint(X, Y)
Parent!textx.value = X
Parent!texty.value = Y
Parent!textz.value = TypeName(objPick)
End Sub
Compiles OK, but trouble is, I can't get RangeFromPoint to work. X & Y
are displayed correctly, but the typename persistently comes back as
Nothing.
I know RangeFromPoint is supposed to work when the chart is an OWC
control, but why doesn't it work with a form in PivotChart view? Or
am I being stupid?
Thanks for any assistance
Garry