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: 2,069
Default Application.Onkey

Hi,

Is there a way i can shorten:

With Application

.OnKey "{DOWN}"
.OnKey "{BS}"
.OnKey "{END}"
.OnKey "{HOME}"
.OnKey "{UP}"
.OnKey "{TAB}"
.OnKey "{PGDN}"
.OnKey "{PGUP}"
.OnKey "{RIGHT}"
.OnKey "{LEFT}"
.OnKey "{DELETE}"
.OnKey "{ESC}"
.OnKey "^{DEL}"
.OnKey "^{INSERT}"
.OnKey "^{F1}"
.OnKey "^{F2}"
.OnKey "^{F3}"
.OnKey "^{F4}"
.OnKey "^{F5}"
.OnKey "^{F6}"
.OnKey "^{F7}"
.OnKey "^{F8}"
.OnKey "^{F9}"
.OnKey "^{F10}"
.OnKey "^{F11}"
.OnKey "^{F12}"

End With

I've tried to use a reference to each of the keystrokes {DOWN} {BS} etc in a
sheet array Tbl_Keys and reference this in VB using:

Mykey = " ""{" & Application.WorksheetFunction.Index(Rng, I, 1) & "}, """
Application.OnKey Mykey

but i when i try to run it i get the message "Method 'Onkey of
Object_Application' failed.

Any ideas would be great.
Thanks
John


 
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
Application.Onkey for ^F not working Roopa Excel Programming 2 December 11th 08 08:30 PM
How to apply Application.OnKey dewanna Excel Programming 1 April 7th 06 07:16 AM
Application.OnKey Norman Jones Excel Programming 0 January 27th 05 01:26 AM
Application.OnKey problem R Avery Excel Programming 0 July 8th 04 06:38 PM
Application.OnKey problem Phillip Reeves[_2_] Excel Programming 1 January 23rd 04 06:46 PM


All times are GMT +1. The time now is 01:37 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"