#1
|
|||
|
|||
Excel VBA: Key Bindings?
I want to add a key binding with Excel VBA. I've searched the Internet for this and only Word VBA key binding was found. The way we do in Word cannot be done in Excel: Code:
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKey0), _ KeyCategory:=wdKeyCategoryCommand, _ Command:="TestKeybinding" Thanks in advance. |
#2
|
|||
|
|||
I've found some hints on the Internet, yet it doesn't work at all in my case:
http://vbadud.blogspot.hk/2007/06/assigning-shortcut-keys-excel-macros.html Code:
Sub a() Application.OnKey "^t", "b" End Sub Sub b() MsgBox "b..." End Sub |
#3
|
|||
|
|||
Quote:
Book1.xlsm I have just tested the codes. It works with Procedure a() but not Procedure c(). Just can't figure out why. Please tell me if ya know why. Thanks. |
Tags |
key bindings, vba excel |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2011 can't open old Excel 98 or Excel X files | FLJohnson | Excel | 8 | 05-09-2012 11:26 PM |
Excel 2007 custom ribbon not showing in Excel 2010 | Paulzak | Excel | 2 | 02-17-2012 06:35 PM |
saving data in excel 2010 from excel 2003 | johnkcalg | Excel | 1 | 02-06-2012 07:33 PM |
VBA code from Excel 2007 in Excel 2010 | csam63 | Excel Programming | 1 | 10-07-2011 10:46 AM |
Opening multiple Excel files within the same Excel window. | lost9471 | Excel | 2 | 05-01-2010 01:57 PM |