ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Remove Shortcuts (https://www.excelbanter.com/excel-programming/408446-remove-shortcuts.html)

Gary''s Student

Remove Shortcuts
 
Does anyone have code that will loop over all the macros in a workbook and
remove any shortcuts assigned to the macros??

Thanks for any leads.
--
Gary''s Student - gsnu2007xx

Peter T

Remove Shortcuts
 
Do you mean selectively remove shortcut keys to all macros in a single
workbook (hard unless you know what they are) or remove all shortcuts to
macros (easy).

Regards,
Peter T

"Gary''s Student" wrote in message
...
Does anyone have code that will loop over all the macros in a workbook and
remove any shortcuts assigned to the macros??

Thanks for any leads.
--
Gary''s Student - gsnu2007xx




Gary''s Student

Remove Shortcuts
 
Thanks for responding. I think the easy option is the way to go. I can
assign a shortcut, then turn on the Recorder and remove the shortcut
manually. The recorder gives:

Application.MacroOptions Macro:="Macro1", ShortcutKey:=""

So I figured I was in good shape. I could use syntax like:

For Each Macro in ActiveWorkbook.Macros
s = Macro.Name
Application.MacroOptions Macro:=s, ShortcutKey:=""
Next

However the above is pure junk! I can't find the right Objects over which I
can loop.


--
Gary''s Student - gsnu200776


"Peter T" wrote:

Do you mean selectively remove shortcut keys to all macros in a single
workbook (hard unless you know what they are) or remove all shortcuts to
macros (easy).

Regards,
Peter T

"Gary''s Student" wrote in message
...
Does anyone have code that will loop over all the macros in a workbook and
remove any shortcuts assigned to the macros??

Thanks for any leads.
--
Gary''s Student - gsnu2007xx





Peter T

Remove Shortcuts
 



Peter T

Remove Shortcuts
 
Hmm.......

I deliberately sent that empty message to see if it was received, which it
was. In the last 24hrs I have tried to reply with a code example at least 6
times, none received. I even started a new thread with same subject with
similar message and code, which also vanished.

I can only assume there is something in the code that has prevented all my
messages from appearing, some coincidental unintended tag doing bad things,
perhaps.

Anyway, Gary's Student, if you still want the intended reply contact me
off-line (see below).

Regards,
Peter T
pmbthornton gmail com




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com