• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to get the list of ALL macros...and macro "dependencies"

iferror

Member
Hi Excellers,
I already have a macro to get the full list of all macros in all modules in a given project. But now i'd like to enrich the capabilites by adding macro dependencies. So that if a macro in the list calls other macros i have this piece of info along with name, type, scope and declaration (that i already have).
Has anyone ever done something like that?

AS IS:
Code:
MACRONAME        TYPE       SCOPE      DECLARATION
GetALL                 SUB       PUB           GetALL()
GetThat                SUB       PRV           GetThat(byval var as integer)
GetThis                SUB       PRV           GetThis(byval var as string)
Solve4x                FUN       PRV           Solve4x(byref var) as int

TO BE:
Code:
MACRONAME        TYPE       SCOPE      DECLARATION                          DEPENDENCIES
GetALL                 SUB       PUB           GetALL()                                  GetThat,GetThis
GetThat                SUB       PRV           GetThat(byval var as integer)    Solve4x
GetThis                SUB       PRV           GetThis(byval var as string)      
Solve4x                FUN       PRV           Solve4x(byref var) as int

I only need one level, so that if Macro1 calls Macro2 and Macro2 in turn calls Macro3, my goal is to get something like

Code:
MACRONAME        TYPE       SCOPE      DECLARATION                          DEPENDENCIES
Macro1                 ...           ...            ...                                            Macro2
Macro2                 ...           ...            ...                                            Macro3

no need to get something recursive that crawls to the leaf

Thanks for any help
 
Back
Top