Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
I was referred to an article by Jon Peltier for how to trap chart events and it was very helpful with trapping mouse clicks on all areas of a chart. I've got some code that inserts small jpg images on the chart whenever a single chart point is selected. That portion works well. I'd like a user to use the arrow keys to move from point to point rather than mouse clicking on each point. One reason for this is that some groups of datapoints are tightly packed and difficult to click on separately. The Chart Events routines provided by the article don't recognize subsequent point selections when initiated using the arrow keys. I looked at the specific events trappable and none deal with keyup or keydown while a series point is selected. Please let me know if you know a work-around. Regards. |
#2
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
As you have discovered the chart does not expose any key based events. I can't think of any work arounds in terms of events. But maybe you could use a userform to allow the use to select chart elements. Cheers Andy RLang wrote: Hi, I was referred to an article by Jon Peltier for how to trap chart events and it was very helpful with trapping mouse clicks on all areas of a chart. I've got some code that inserts small jpg images on the chart whenever a single chart point is selected. That portion works well. I'd like a user to use the arrow keys to move from point to point rather than mouse clicking on each point. One reason for this is that some groups of datapoints are tightly packed and difficult to click on separately. The Chart Events routines provided by the article don't recognize subsequent point selections when initiated using the arrow keys. I looked at the specific events trappable and none deal with keyup or keydown while a series point is selected. Please let me know if you know a work-around. Regards. -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#4
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi Tushar,
I went with the OnKey method. It works perfectly. I just had to make sure I enable/disabled it at the right times and error trapped appropriately. Thanks for the suggestion. RLang "Tushar Mehta" wrote: Neither of these suggestions is trivial or fully tested. 1) Use the OnKey method to trap the use of the arrow key(s). Of course, you will then have to select the appropriate item yourself. 2) Use OnTime to trigger a routine every second. This routine would use the XL4 macro -- SELECTION() -- to detect what chart element, if any, was selected. [You could speed up the rate at which the routine is executed by using the Windows SetTimer and KillTimer APIs but there are other issues you will have to address with these routines.] -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... Hi, I was referred to an article by Jon Peltier for how to trap chart events and it was very helpful with trapping mouse clicks on all areas of a chart. I've got some code that inserts small jpg images on the chart whenever a single chart point is selected. That portion works well. I'd like a user to use the arrow keys to move from point to point rather than mouse clicking on each point. One reason for this is that some groups of datapoints are tightly packed and difficult to click on separately. The Chart Events routines provided by the article don't recognize subsequent point selections when initiated using the arrow keys. I looked at the specific events trappable and none deal with keyup or keydown while a series point is selected. Please let me know if you know a work-around. Regards. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting values in a bar chart | Charts and Charting in Excel | |||
Activating a Chart object | Charts and Charting in Excel | |||
Urgent Chart Assistance | Charts and Charting in Excel | |||
Urgent Chart Questions | Excel Discussion (Misc queries) | |||
Urgent Chart Assistance Requested | Excel Discussion (Misc queries) |