Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Use Keyboard with KeyDown and KeyUp

I am working on a sheet that has keyboard shortcuts. I want to use
keyboard buttons to control the worksheet. For example, if I press
the "q" key down, I want TextBox1 to appear. When the "q" key is
released (KeyUP), TextBox1 should go away.
TextBox1 can be generated in the code under the KeyDown sub, and
deleted after KeyUp, I just don't know how to catch the keyboard key
actions with KeyDown and KeyUp.

Thanks,
Donny

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Use Keyboard with KeyDown and KeyUp

On Sep 22, 10:01 am, Donny wrote:
I am working on a sheet that has keyboard shortcuts. I want to use
keyboard buttons to control the worksheet. For example, if I press
the "q" key down, I want TextBox1 to appear. When the "q" key is
released (KeyUP), TextBox1 should go away.
TextBox1 can be generated in the code under the KeyDown sub, and
deleted after KeyUp, I just don't know how to catch the keyboard key
actions with KeyDown and KeyUp.

Thanks,
Donny


Hello Donny,

You can catch the KeyUp and KeyDown events on a VBA UserForm. There
are no equivalent events for an Excel Worksheet. Although a short cut
key can be assign directly to macro, this doesn't mean keyboard events
are also associated with the same macro automatically. Up and down
movement of Worksheet keystrokes can only be monitored by using
advanced API code techniques.

Sincerely,
Leith Ross

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
Distinguish between '<' and '.' with KeyUp? robotman Excel Programming 2 June 12th 07 06:01 PM
keydown event Peter T Excel Programming 0 April 18th 05 02:03 PM
keydown event K Dales[_2_] Excel Programming 0 April 18th 05 12:46 PM
Detect MsgBox keyUp Paul Stevens Excel Programming 2 December 12th 03 02:20 PM
keydown event jim c. Excel Programming 1 October 10th 03 03:16 AM


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