![]() |
VBA: syntax to review macro names in a file?
I frequently use code such as
Dim SheetName For Each SheetName in Sheets .... to perform repetitive actions on all tabs in a workbook. Is there a similar way to review all macros in a workbook? For instance: if I wanted to reset any shortcut keys that may be applied to macros, is there something akin to dim Makroname for each Makroname in Reserved_Word_to_Reference_Macro_List Application.MacroOptions Macro:="'filename.xls'!" & Makroname, Description:="", ShortcutKey:="" Thanks |
It's my understanding that the shortcut keys assigned to VB macros through
the Excel Macros dialog are only 'seeable' through that dialog and by exporting (File, Export in the VBE) the code of the VB module. For instance a sub named MySub to which I had assigned the shortcut "a" had this 'attribute' in the export: Attribute MySub.VB_ProcData.VB_Invoke_Func = "a\n14" I don't know what the \n14 means. The MacroOptions method only seems useful for assigning shortcuts, etc., not finding them. And, of course, any shortcuts assigned with OnKey will not show up anywhere. -- Jim wrote in message oups.com... |I frequently use code such as | Dim SheetName | For Each SheetName in Sheets | ... to perform repetitive actions on all tabs in a workbook. Is there | a similar way to review all macros in a workbook? For instance: if I | wanted to reset any shortcut keys that may be applied to macros, is | there something akin to | | dim Makroname | for each Makroname in Reserved_Word_to_Reference_Macro_List | Application.MacroOptions Macro:="'filename.xls'!" & Makroname, | Description:="", ShortcutKey:="" | | Thanks | |
Thanks, Jim, I'll read up on attributes.
|
All times are GMT +1. The time now is 02:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com