Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Unassign Macro Keyboard Shortcut?

Not a show stopper, but when I am developing a complex Macro, I will often
record little slices of code and accept the default Macro name (Macro1,
Macro2... etc.), then to test it I may assign a keyboard shortcut to it so I
can give it a shot on several WS. Later I may want to re-use the shortcut
without deleting the original Macro. In other words I need to "unassign" the
shortcut to Macro[n], and assign it to Macro[n+x]. It's the old "quick and
dirty" game.

However when I use what seems logical, namely the Delete key, I get a
nasty-gram telling me that the shortcut meeds to be an alpha character.

That being said -- I have a hunch there is a way (the Help files being as
unhelpful as usual <g).
--
Dave
Temping with Staffmark
in Rock Hill, SC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Unassign Macro Keyboard Shortcut?

Dave,

Search the VBA help for the "OnKey" method. For example, if you have a
macro assigned to the shortcut CTRL+1, you can use this to clear it

Application.OnKey "^1"

you can just type it in the Immediate window of the VBE and hit Enter.


--
Hope that helps.

Vergel Adriano


"Dave Birley" wrote:

Not a show stopper, but when I am developing a complex Macro, I will often
record little slices of code and accept the default Macro name (Macro1,
Macro2... etc.), then to test it I may assign a keyboard shortcut to it so I
can give it a shot on several WS. Later I may want to re-use the shortcut
without deleting the original Macro. In other words I need to "unassign" the
shortcut to Macro[n], and assign it to Macro[n+x]. It's the old "quick and
dirty" game.

However when I use what seems logical, namely the Delete key, I get a
nasty-gram telling me that the shortcut meeds to be an alpha character.

That being said -- I have a hunch there is a way (the Help files being as
unhelpful as usual <g).
--
Dave
Temping with Staffmark
in Rock Hill, SC

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Unassign Macro Keyboard Shortcut?

I KNEW there must be a way <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC


"Vergel Adriano" wrote:

Dave,

Search the VBA help for the "OnKey" method. For example, if you have a
macro assigned to the shortcut CTRL+1, you can use this to clear it

Application.OnKey "^1"

you can just type it in the Immediate window of the VBE and hit Enter.


--
Hope that helps.

Vergel Adriano


"Dave Birley" wrote:

Not a show stopper, but when I am developing a complex Macro, I will often
record little slices of code and accept the default Macro name (Macro1,
Macro2... etc.), then to test it I may assign a keyboard shortcut to it so I
can give it a shot on several WS. Later I may want to re-use the shortcut
without deleting the original Macro. In other words I need to "unassign" the
shortcut to Macro[n], and assign it to Macro[n+x]. It's the old "quick and
dirty" game.

However when I use what seems logical, namely the Delete key, I get a
nasty-gram telling me that the shortcut meeds to be an alpha character.

That being said -- I have a hunch there is a way (the Help files being as
unhelpful as usual <g).
--
Dave
Temping with Staffmark
in Rock Hill, SC

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
keyboard shortcut for a macro Gary[_2_] Excel Worksheet Functions 3 October 24th 07 07:25 PM
Keyboard Shortcut in Macro osaka78 Excel Discussion (Misc queries) 3 January 16th 06 08:47 AM
writting a macro for the sum function so I can use it as a keyboard shortcut Dominic Coombe Excel Programming 0 July 22nd 04 06:59 PM
writting a macro for the sum function so I can use it as a keyboard shortcut JulieD Excel Programming 0 July 22nd 04 03:47 PM
Find Keyboard shortcut in a macro AuthorizedUserPF[_2_] Excel Programming 4 February 17th 04 04:06 AM


All times are GMT +1. The time now is 10:39 AM.

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"