View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default How to list all user-defined keyboard shortcuts

On Thu, 10 Oct 2013 16:28:59 -0700 (PDT), wrote:

Does anyone know how to use VBA to produce a list of all the keyboard shortcuts I've set up within Excel? I've done this for Word but the Excel object model isn't like the Word model in this respect and I can't see how to do it.

Howard


I haven't done it but I know the general algorithm for shortcut keys you have assigned to macros.

In the "Trust Center" you need to Trust Access to the VBA Project Object Model. See Chip Pearson's web site on programming the VBA Editor

Loop through all the modules
Select those which are Code Modules
Export those modules to a text file

Those text files will have the shortcut key listed (as well as the code and the procedure name), so you can parse it out and save it someplace.