Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default ShortcutKey assigning in VBA

Hi,

is it possible to assign a shortcut key to a menu-item? You can assign the
text with the .ShortcutText but how can you make it work (if you press the
ShortcutText, it should do the job!)

Thanks
Jos Vens


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default ShortcutKey assigning in VBA

Hi Jos,
No, but you can assign a short cut to the macro independently of
creating a menu item so you have what you want. If you are going to
have both you might include the shortcut within the menu item description.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jos Vens" wrote in message ...
Hi,

is it possible to assign a shortcut key to a menu-item? You can assign the
text with the .ShortcutText but how can you make it work (if you press the
ShortcutText, it should do the job!)

Thanks
Jos Vens




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default ShortcutKey assigning in VBA

Thanks David,

is the OnKey method, the only way to accomplish that in VBA?

Thanks
Jos

"David McRitchie" schreef in bericht
...
Hi Jos,
No, but you can assign a short cut to the macro independently of
creating a menu item so you have what you want. If you are going to
have both you might include the shortcut within the menu item description.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jos Vens" wrote in message

...
Hi,

is it possible to assign a shortcut key to a menu-item? You can assign

the
text with the .ShortcutText but how can you make it work (if you press

the
ShortcutText, it should do the job!)

Thanks
Jos Vens






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default ShortcutKey assigning in VBA

Hi Jos,
I don't know about the second part, but the first part (pass) for a list of
macros is certainly not needed. See
http://www.mvps.org/dmcritchie/excel...nctionsAndSubs

but I tried putting that list in in place of the first part and the shortcuts were
out of sync. But I did say that it was very suitable for me -- it takes too long.

Wish I could extract the shortcut key directly for the bookname!modulename.macroname
for the List Functions and Subs table.,

and also from when I run through the menus, I should be able to pick up the shortcut
keys but could not. barhopper.htm

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jos Vens" wrote in message ...
Thanks David,

is the OnKey method, the only way to accomplish that in VBA?

Thanks
Jos

"David McRitchie" schreef in bericht
...
Hi Jos,
No, but you can assign a short cut to the macro independently of
creating a menu item so you have what you want. If you are going to
have both you might include the shortcut within the menu item description.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jos Vens" wrote in message

...
Hi,

is it possible to assign a shortcut key to a menu-item? You can assign

the
text with the .ShortcutText but how can you make it work (if you press

the
ShortcutText, it should do the job!)

Thanks
Jos Vens








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default ShortcutKey assigning in VBA

Symantics maybe. But you could assign a shortcut key to the macro that's called
when you click the menu item.

Take a look in VBA's help for MacroOptions.

There's a nice example.



Jos Vens wrote:

Hi,

is it possible to assign a shortcut key to a menu-item? You can assign the
text with the .ShortcutText but how can you make it work (if you press the
ShortcutText, it should do the job!)

Thanks
Jos Vens


--

Dave Peterson

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
Assigning Bin to Value Suzanne[_2_] Excel Discussion (Misc queries) 2 March 19th 09 06:19 PM
assigning # to day bmo Excel Worksheet Functions 3 October 17th 07 11:16 PM
Assigning a Value KaraSuzanne Excel Discussion (Misc queries) 3 August 17th 07 05:34 PM
shortcutkey F9 help me please i´m lost Excel Worksheet Functions 3 February 22nd 06 05:04 PM
Assigning a value to a name Charli Excel Worksheet Functions 2 November 24th 04 08:50 PM


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

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"