![]() |
Key behaviour
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. |
Key behaviour
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! * |
All times are GMT +1. The time now is 02:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com