Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to assign subroutines to two key sequences, default Excel
shortcut key sequences: Ctrl [ and Ctrl ]. Is this possible? I placed this code in the "ThisWorkbook" module of PERSONAL.xls and got this error: "Method 'OnKey' object '_Application' failed. ------- Option Explicit Private Sub Workbook_Open() Application.OnKey "^[", "FindLinkedCell" Application.OnKey "^[", "ReturnToCell" End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnKey "^[" Application.OnKey "^]" End Sub --------- The the procedures execute and the keys are rediefined if I use Ctrl a ("^a") and Ctrl b. John Wirt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
Use this Application.OnKey "^{[}", "FindLinkedCell" -- Regards Ron de Bruin http://www.rondebruin.nl "John Wirt" wrote in message ... I would like to assign subroutines to two key sequences, default Excel shortcut key sequences: Ctrl [ and Ctrl ]. Is this possible? I placed this code in the "ThisWorkbook" module of PERSONAL.xls and got this error: "Method 'OnKey' object '_Application' failed. ------- Option Explicit Private Sub Workbook_Open() Application.OnKey "^[", "FindLinkedCell" Application.OnKey "^[", "ReturnToCell" End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnKey "^[" Application.OnKey "^]" End Sub --------- The the procedures execute and the keys are rediefined if I use Ctrl a ("^a") and Ctrl b. John Wirt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron, Thank you. John
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Unfortunately, this solution does not work (at least for me).
John "Ron de Bruin" wrote in message ... Hi John Use this Application.OnKey "^{[}", "FindLinkedCell" |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
Do you see an error? -- Regards Ron de Bruin http://www.rondebruin.nl "John Wirt" wrote in message ... Unfortunately, this solution does not work (at least for me). John "Ron de Bruin" wrote in message ... Hi John Use this Application.OnKey "^{[}", "FindLinkedCell" |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, the error is: Method 'OnKey' of object '_Application' failed.
The code is (copied): Private Sub Workbook_Open() Application.OnKey "^([)", "FindLinkedCell" Application.OnKey "^(])", "ReturnToCell" End Sub John ---------------------------- "Ron de Bruin" wrote in message ... Hi John Do you see an error? -- Regards Ron de Bruin http://www.rondebruin.nl |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use a { and not a (
-- Regards Ron de Bruin http://www.rondebruin.nl "John Wirt" wrote in message ... Yes, the error is: Method 'OnKey' of object '_Application' failed. The code is (copied): Private Sub Workbook_Open() Application.OnKey "^([)", "FindLinkedCell" Application.OnKey "^(])", "ReturnToCell" End Sub John ---------------------------- "Ron de Bruin" wrote in message ... Hi John Do you see an error? -- Regards Ron de Bruin http://www.rondebruin.nl |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a difference between CTRL+D and CTRL+" (quotation marks) | Excel Discussion (Misc queries) | |||
How to make Ctrl-C, ctrl-V work in Office 2007 | Excel Discussion (Misc queries) | |||
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets | Excel Discussion (Misc queries) | |||
cut & paste with short cut keys (ctrl C V) with absolute cell refe | Excel Discussion (Misc queries) | |||
Disabling Ctrl-PgUp and Ctrl-PgDn | Excel Programming |