B
Brian Murphy
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
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