LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Redefining the Ctrl [ and Ctrl ]s short cut with OnKey?

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


 
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
Is there a difference between CTRL+D and CTRL+" (quotation marks) AKMMS Excel Discussion (Misc queries) 2 March 22nd 10 07:43 PM
How to make Ctrl-C, ctrl-V work in Office 2007 hj Excel Discussion (Misc queries) 1 June 23rd 09 01:09 PM
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets DrDave Excel Discussion (Misc queries) 1 July 28th 08 04:12 AM
cut & paste with short cut keys (ctrl C V) with absolute cell refe Modeller Dave Excel Discussion (Misc queries) 1 December 7th 04 11:14 PM
Disabling Ctrl-PgUp and Ctrl-PgDn K.A. Hueston Excel Programming 3 October 9th 04 12:31 AM


All times are GMT +1. The time now is 01:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"