Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
Is there a possibilty to capture the keycode from a worksheet. Not from a form or checkbox or related objets. I would like to recognize from the worksheet when a <F4 is given to execute some code. Many thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Fri, 18 Jul 2003 01:21:44 -0700, "Rodney"
wrote: Hi there, Is there a possibilty to capture the keycode from a worksheet. Not from a form or checkbox or related objets. I would like to recognize from the worksheet when a <F4 is given to execute some code. Many thanks in advance. Just be aware that this will last for the length of your Excel session, and will apply to ALL workbooks. Sub GetKeyAndDoSomething() 'To make this line run automatically, put it in the 'Workbook_Open event in the Workbook's code module 'instead of a standard procedure like this one. Application.OnKey "{F4}", "MyProcedure" End Sub Sub MyProcedure() MsgBox "This is my procedure." End Sub --------------------------------------------------------- Hank Scorpio scorpionet who hates spam is at iprimus.com.au (You know what to do.) * Please keep all replies in this Newsgroup. Thanks! * |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Weird VBA Behaviour | Excel Worksheet Functions | |||
Bizarre XLA behaviour | Excel Discussion (Misc queries) | |||
Range-name Behaviour | Excel Discussion (Misc queries) | |||
for...next funny behaviour | Excel Discussion (Misc queries) | |||
Strange behaviour | Excel Worksheet Functions |