LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Chart events - how to select points and not series?

Vic,
My idea of the select is to minimize a side effect. I know of no
other way to de-select the series other than selecting something else.
It would be nice if something like object.deselect were possible.

-John Coleman

(Vic Eldridge) wrote in message om...
John,

The Select method is renowned for side effects like that.
So don't use it. I am 99.99% sure there's no valid reason
to be selecting a cell in the middle of your algorithm.


Regards,
Vic Eldridge


(John Coleman) wrote in message . com...
Vic - this is quite nice and almost does what I want. The problem is
that it still changes the appearance of the other points in the series
(avoiding that was why I was trying to use before double click rather
than the select event in the first place) If I place the statement
Range("H15").select in your code (where H10 is a cell masked by the
chart) then this still appears as a momentary flash involving the
other points which no monkeying with screen-updating seems able to
eliminate. This is really a minor aesthetic issue which I can probably
live with. If it bugs me too much I might get radical and make each
point a separate series as my intended application will have less than
256 points.

Thanks again for the nice code.

-John Coleman

(Vic Eldridge) wrote in message om...
John, I think you'll like this one.

Regards,
Vic Eldridge





Dim IDNum As Long
Dim a As Long
Dim b As Long

Private Sub Chart_MouseDown(ByVal Button As Long, ByVal Shift As Long,
ByVal x As Long, ByVal y As Long)
ActiveChart.GetChartElement x, y, IDNum, a, b
End Sub

Private Sub Chart_BeforeDoubleClick(ByVal ElementID As Long, ByVal
Arg1 As Long, ByVal Arg2 As Long, Cancel As Boolean)
If IDNum = xlSeries Or IDNum = xlDataLabel Then
MsgBox "ElementID : " & IDNum & vbLf & _
"SeriesIndex : " & a & vbLf & _
"PointIndex : " & b
Cancel = True
End If
End Sub









(John Coleman) wrote in message . com...
Greetings,
I have an embedded chart (XY-scatter) for which I have enabled
events. I want to use BeforeDoubleClick to launch a sub when a series
point is double-clicked with the coordinates of the point as
parameters of the sub. The online help says that the parameter Arg2
should be the point index of the selected point of the selected
series. This is exactly what I want, but BeforeDoubleClick seems to
set Arg2 to -1 the majority of the times. This seems to be when the
entire series rather than a point is selected. Does anyone know of a
way that I can avoid this behavior? When I put the mouse over a point
and double click I would like to be able to reliably capture the point
index.

A similar problem involves data labels.

Thank you for your time.

-John Coleman

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Chart - Too many data points in Series? Will H. Excel Discussion (Misc queries) 1 December 16th 08 07:35 AM
How to Draw a chart line connecting 2 points in the middle of the series KathyC Charts and Charting in Excel 3 November 28th 06 12:30 AM
not able to link chart points from same series [email protected] Charts and Charting in Excel 1 September 19th 06 01:36 PM
Line chart with two series; how to add points to one and not the other? chowgirl Charts and Charting in Excel 0 February 8th 06 09:10 PM
How do I select multiple data points on my chart? Matthew S Charts and Charting in Excel 1 September 13th 05 06:38 PM


All times are GMT +1. The time now is 06:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"