Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
wal wal is offline
external usenet poster
 
Posts: 19
Default OnKey - usable to assign new shortcuts to existing Excel keyboardshortcuts?

Excel 2003

Sorry if this is a repeat post. Google Groups seems to take posts
about 2/3 of the time. Anyway...

It appears that Application.OnKey can do only the three following
tasks:
- Remove the assignment of an Excel keyboard shortcut.
- Restore that assignment.
- Assign a keyboard shortcut to a **MACRO**.

Can it also be used to assign a customized keyboard shortcut to an
ordinary Excel feature? For example, I'd like to assign F3 to "Find
Next" (whose default shortcut is Shift-F4; I often end up hitting Ctrl-
F4 and closing the workbook). I'd lose the existing functionality of
F3, but I never use it anyway.

If not OnKey, is there another VBA Method that would do this?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default OnKey - usable to assign new shortcuts to existing Excel keyboard shortcuts?

You got responses to your post yesterday. I'll repeat mine:

Sub AssignF3ToFindNext()
Application.OnKey "{F3}", "MyFindNext"
End Sub

Sub MyFindNext()
Cells.FindNext(Selection).Select
End Sub


--
Jim
"wal" wrote in message
...
| Excel 2003
|
| Sorry if this is a repeat post. Google Groups seems to take posts
| about 2/3 of the time. Anyway...
|
| It appears that Application.OnKey can do only the three following
| tasks:
| - Remove the assignment of an Excel keyboard shortcut.
| - Restore that assignment.
| - Assign a keyboard shortcut to a **MACRO**.
|
| Can it also be used to assign a customized keyboard shortcut to an
| ordinary Excel feature? For example, I'd like to assign F3 to "Find
| Next" (whose default shortcut is Shift-F4; I often end up hitting Ctrl-
| F4 and closing the workbook). I'd lose the existing functionality of
| F3, but I never use it anyway.
|
| If not OnKey, is there another VBA Method that would do this?
|
| Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
wal wal is offline
external usenet poster
 
Posts: 19
Default OnKey - usable to assign new shortcuts to existing Excel keyboardshortcuts?

Thanks.

On Oct 27, 9:06*am, "Jim Rech" wrote:
You got responses to your post yesterday. *I'll repeat mine:

Sub AssignF3ToFindNext()
* * Application.OnKey "{F3}", "MyFindNext"
End Sub

Sub MyFindNext()
* * Cells.FindNext(Selection).Select
End Sub

--
Jim"wal" wrote in message

...
| Excel 2003
|
| Sorry if this is a repeat post. *Google Groups seems to take posts
| about 2/3 of the time. *Anyway...
|
| It appears that Application.OnKey can do only the three following
| tasks:
| - Remove the assignment of an Excel keyboard shortcut.
| - Restore that assignment.
| - Assign a keyboard shortcut to a **MACRO**.
|
| Can it also be used to assign a customized keyboard shortcut to an
| ordinary Excel feature? *For example, I'd like to assign F3 to "Find
| Next" (whose default shortcut is Shift-F4; I often end up hitting Ctrl-
| F4 and closing the workbook). *I'd lose the existing functionality of
| F3, but I never use it anyway.
|
| If not OnKey, is there another VBA Method that would do this?
|
| Thanks.


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
Assign keyboard shortcuts Ms Excel Worksheet Functions 0 January 26th 09 12:59 AM
Assign different keyboard shortcuts wal Excel Programming 4 October 26th 08 11:26 PM
Can I assign keyboard shortcuts for special characters in Excel 20 tyhubb Excel Discussion (Misc queries) 1 August 15th 08 06:36 PM
Excel 2003 assign keyboard shortcuts to specific special character Tina Shaw Excel Discussion (Misc queries) 1 July 17th 08 08:55 PM
assign onkey to 1 worksheet short_n_curly[_2_] Excel Programming 5 July 1st 05 05:23 PM


All times are GMT +1. The time now is 03:44 AM.

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"