View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default 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