Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Redirecting ALT+1 keystrokes to run routine

In an Excel 2007 Workbook I'd like to redirect or capture the ALT+1, ALT+2,
ALT+3, etc. key stroke combinations to run some navigation routines I've
written. I've tried using the following in the Workbook.Open event.

Application.OnKey "%{1}", "sNavigateToGroup1"
Application.OnKey "%{2}", "sNavigateToGroup2"
Application.OnKey "%{3}", "sNavigateToGroup3"
Application.OnKey "%{4}", "sNavigateToGroup4"
Application.OnKey "%{5}", "sNavigateToGroup5"
Application.OnKey "%{6}", "sNavigateToGroup6"

This doesn't work. If anyone has experience with this type of routine or
can point me in the right direction, I'd be very appreciative.

TIA,

Ken

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Redirecting ALT+1 keystrokes to run routine

Hope Ron does not mind me using his site. Here is a compehenssive discuaaion
about Application.OnKey:

http://www.rondebruin.nl/key.htm

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Redirecting ALT+1 keystrokes to run routine

According to the link, the only thing I would need to do is remove the curly
brackets since the numeral keys are not considered special keys. I did so,
but the key combinations still do not work.

Anybody else have any ideas?

Ken

"Philosophaie" wrote:

Hope Ron does not mind me using his site. Here is a compehenssive discuaaion
about Application.OnKey:

http://www.rondebruin.nl/key.htm

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,346
Default Redirecting ALT+1 keystrokes to run routine

Hi,

I think Alt is a bad choice, why not try Ctrl+1...., that works fine for me.
Syntax is: "^1"

Possibly the problem with Alt is that it is the beginning of menu/ribbon
shortcut key activation, so if you press Alt+1 Excel assumes you want to run
the first QAT toolbar button. If instead you use Alt+B which is not an
assigned options it will work. The syntax being "%B"

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Ken Warthen" wrote:

According to the link, the only thing I would need to do is remove the curly
brackets since the numeral keys are not considered special keys. I did so,
but the key combinations still do not work.

Anybody else have any ideas?

Ken

"Philosophaie" wrote:

Hope Ron does not mind me using his site. Here is a compehenssive discuaaion
about Application.OnKey:

http://www.rondebruin.nl/key.htm

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Redirecting ALT+1 keystrokes to run routine

Looks like you only assign Alt-8 & 9 in 2007. But Ctrl-alt seems to work
with the others. Don't forget to omit the curly brackets

Regards,
Peter T


"Ken Warthen" wrote in message
...
In an Excel 2007 Workbook I'd like to redirect or capture the ALT+1,
ALT+2,
ALT+3, etc. key stroke combinations to run some navigation routines I've
written. I've tried using the following in the Workbook.Open event.

Application.OnKey "%{1}", "sNavigateToGroup1"
Application.OnKey "%{2}", "sNavigateToGroup2"
Application.OnKey "%{3}", "sNavigateToGroup3"
Application.OnKey "%{4}", "sNavigateToGroup4"
Application.OnKey "%{5}", "sNavigateToGroup5"
Application.OnKey "%{6}", "sNavigateToGroup6"

This doesn't work. If anyone has experience with this type of routine or
can point me in the right direction, I'd be very appreciative.

TIA,

Ken





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Redirecting ALT+1 keystrokes to run routine

Thanks for the advice. I switched to CTL and everything is working fine.

Ken

"Peter T" wrote:

Looks like you only assign Alt-8 & 9 in 2007. But Ctrl-alt seems to work
with the others. Don't forget to omit the curly brackets

Regards,
Peter T


"Ken Warthen" wrote in message
...
In an Excel 2007 Workbook I'd like to redirect or capture the ALT+1,
ALT+2,
ALT+3, etc. key stroke combinations to run some navigation routines I've
written. I've tried using the following in the Workbook.Open event.

Application.OnKey "%{1}", "sNavigateToGroup1"
Application.OnKey "%{2}", "sNavigateToGroup2"
Application.OnKey "%{3}", "sNavigateToGroup3"
Application.OnKey "%{4}", "sNavigateToGroup4"
Application.OnKey "%{5}", "sNavigateToGroup5"
Application.OnKey "%{6}", "sNavigateToGroup6"

This doesn't work. If anyone has experience with this type of routine or
can point me in the right direction, I'd be very appreciative.

TIA,

Ken



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Redirecting ALT+1 keystrokes to run routine

FWIW Ctrl-1 is one of the most common built-in shortcuts I use, maybe your
users too... Which is why I suggested Ctrl-Alt.

Regards,
Peter T

"Ken Warthen" wrote in message
...
Thanks for the advice. I switched to CTL and everything is working fine.

Ken

"Peter T" wrote:

Looks like you only assign Alt-8 & 9 in 2007. But Ctrl-alt seems to work
with the others. Don't forget to omit the curly brackets

Regards,
Peter T


"Ken Warthen" wrote in message
...
In an Excel 2007 Workbook I'd like to redirect or capture the ALT+1,
ALT+2,
ALT+3, etc. key stroke combinations to run some navigation routines
I've
written. I've tried using the following in the Workbook.Open event.

Application.OnKey "%{1}", "sNavigateToGroup1"
Application.OnKey "%{2}", "sNavigateToGroup2"
Application.OnKey "%{3}", "sNavigateToGroup3"
Application.OnKey "%{4}", "sNavigateToGroup4"
Application.OnKey "%{5}", "sNavigateToGroup5"
Application.OnKey "%{6}", "sNavigateToGroup6"

This doesn't work. If anyone has experience with this type of routine
or
can point me in the right direction, I'd be very appreciative.

TIA,

Ken



.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Redirecting ALT+1 keystrokes to run routine

Thanks for the advice. I noticed my shortcuts work if I'm using the numbers
at the top of the keyboard, but not if I'm using the number keys on the
NumPad. Is there a fix for this too?

Ken

"Peter T" wrote:

FWIW Ctrl-1 is one of the most common built-in shortcuts I use, maybe your
users too... Which is why I suggested Ctrl-Alt.

Regards,
Peter T

"Ken Warthen" wrote in message
...
Thanks for the advice. I switched to CTL and everything is working fine.

Ken

"Peter T" wrote:

Looks like you only assign Alt-8 & 9 in 2007. But Ctrl-alt seems to work
with the others. Don't forget to omit the curly brackets

Regards,
Peter T


"Ken Warthen" wrote in message
...
In an Excel 2007 Workbook I'd like to redirect or capture the ALT+1,
ALT+2,
ALT+3, etc. key stroke combinations to run some navigation routines
I've
written. I've tried using the following in the Workbook.Open event.

Application.OnKey "%{1}", "sNavigateToGroup1"
Application.OnKey "%{2}", "sNavigateToGroup2"
Application.OnKey "%{3}", "sNavigateToGroup3"
Application.OnKey "%{4}", "sNavigateToGroup4"
Application.OnKey "%{5}", "sNavigateToGroup5"
Application.OnKey "%{6}", "sNavigateToGroup6"

This doesn't work. If anyone has experience with this type of routine
or
can point me in the right direction, I'd be very appreciative.

TIA,

Ken



.



.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Redirecting ALT+1 keystrokes to run routine

I don't think Onkey works with the number pad in any version.

Regards,
Peter T

"Ken Warthen" wrote in message
...
Thanks for the advice. I noticed my shortcuts work if I'm using the
numbers
at the top of the keyboard, but not if I'm using the number keys on the
NumPad. Is there a fix for this too?

Ken

"Peter T" wrote:

FWIW Ctrl-1 is one of the most common built-in shortcuts I use, maybe
your
users too... Which is why I suggested Ctrl-Alt.

Regards,
Peter T

"Ken Warthen" wrote in message
...
Thanks for the advice. I switched to CTL and everything is working
fine.

Ken

"Peter T" wrote:

Looks like you only assign Alt-8 & 9 in 2007. But Ctrl-alt seems to
work
with the others. Don't forget to omit the curly brackets

Regards,
Peter T


"Ken Warthen" wrote in message
...
In an Excel 2007 Workbook I'd like to redirect or capture the ALT+1,
ALT+2,
ALT+3, etc. key stroke combinations to run some navigation routines
I've
written. I've tried using the following in the Workbook.Open event.

Application.OnKey "%{1}", "sNavigateToGroup1"
Application.OnKey "%{2}", "sNavigateToGroup2"
Application.OnKey "%{3}", "sNavigateToGroup3"
Application.OnKey "%{4}", "sNavigateToGroup4"
Application.OnKey "%{5}", "sNavigateToGroup5"
Application.OnKey "%{6}", "sNavigateToGroup6"

This doesn't work. If anyone has experience with this type of
routine
or
can point me in the right direction, I'd be very appreciative.

TIA,

Ken



.



.



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
Redirecting tishoo Excel Discussion (Misc queries) 12 December 27th 06 11:58 PM
Redirecting tishoo Setting up and Configuration of Excel 12 December 27th 06 11:58 PM
Redirecting tishoo Excel Programming 12 December 27th 06 11:58 PM
redirecting personal.xls BorisS Excel Discussion (Misc queries) 5 December 5th 06 11:24 AM
Redirecting macros ... Oscar Excel Programming 1 June 24th 05 04:07 PM


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