LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default how to get onkey macro to fire while another macro is running

Hello to all you Excel Wizards,

I have a macro that does some quick and dirty animation with an embedded chart (I just use a simple loop, and the Escape key to halt). I'm pretty happy with how the animation works but I'd like to enable some keypress commands to control the animation, and excel does not respond to keystrokes while my animation macro is running. This behavior actually makes some sense since you can't click on cells or do anything else while the animation macro is running. I use Application.EnableCancelKey to respond to a press of the Escape key. But Application.OnKey does not work for other keys.

Is there any way to allow my animation macro to respond to presses of other keys besides Escape?

I might point out that I have successfully worked out using mouse movements to control the animation stream. If the mouse isn't moving, the animation plays normally. If the mouse is moved to the right(or left) the animation plays forward (or backward) as long as the mouse keeps moving. Otherwise it starts to play normally again. I'm using the API call GetCursorPos to do this. This is pretty cool. At least to me.

Anyway, responding to some other keystrokes would be nice. I hope it can be done without diving into classes and events, which I suppose is possible since the animation is being done with a single excel chart.

Thanks,

Brian Murphy
Austin, Texas

 
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
Macro to fire upon opening file David P. Excel Discussion (Misc queries) 3 June 26th 08 09:12 PM
Fire Macro from Cell Change Slashman Excel Worksheet Functions 7 October 17th 06 04:08 AM
Onkey vs Macro Short cut key rgarber50 Excel Discussion (Misc queries) 1 July 10th 05 07:34 PM
Macro fire at given time, through command prompt Tim Excel Programming 1 August 19th 04 04:33 PM
Worksheet_Change event won't fire to execute Macro??? jpdill5 Excel Programming 2 February 13th 04 02:34 PM


All times are GMT +1. The time now is 09:10 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"