+ Reply to Thread
Results 1 to 3 of 3

VBA: syntax to review macro names in a file?

  1. #1

    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


  2. #2
    Jim Rech
    Guest

    Re: syntax to review macro names in a file?

    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
    <[email protected]> wrote in message
    news:[email protected]...
    |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
    |



  3. #3

    Re: syntax to review macro names in a file?

    Thanks, Jim, I'll read up on attributes.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1