Deepak
Deepak

Reputation: 473

Checking if a macro is called in another macro

I have a lot of macros in my excel. I don't know whether they are used in that workbook. I don't know whether it is called as a procedure inside other macros.

Is there any way to find out whether the macro is used inside another macros or used in different sheets?

Upvotes: 0

Views: 225

Answers (2)

DisplayName
DisplayName

Reputation: 13386

  • put “Option Explicit” at the beginning of every module

  • comment out your “Macro

  • start debug

    And it’ll point you to any occurrence of “Macro” call

Upvotes: 0

Vityata
Vityata

Reputation: 43585

Probably the easiest way - Ctrl + F.

Write the name of the "Macro" and select search in Current Project. Then start counting how many times it will show up.

Another way is to write debug.print "I am used" after the Sub line of the "Macro". Then count how many times has it popped up on the immediate window.

Upvotes: 2

Related Questions