Remove Shortcuts

  • Thread starter Thread starter Gary''s Student
  • Start date Start date
G

Gary''s Student

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.
 
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
 
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.
 
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
 
Back
Top