Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 47
Default Chart Events - Trapping arrow key strokes

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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Chart Events - Trapping arrow key strokes

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
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1,071
Default Chart Events - Trapping arrow key strokes

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.

  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 47
Default Chart Events - Trapping arrow key strokes

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
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
Sorting values in a bar chart Eric D Charts and Charting in Excel 4 April 17th 06 04:44 PM
Activating a Chart object Hari Prasadh Charts and Charting in Excel 6 August 2nd 05 07:22 PM
Urgent Chart Assistance Brent E Charts and Charting in Excel 1 May 10th 05 09:09 AM
Urgent Chart Questions Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM
Urgent Chart Assistance Requested Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM


All times are GMT +1. The time now is 08:52 PM.

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

About Us

"It's about Microsoft Excel"