Q:

vba Show references to other procedures

Today i want to ask this question.
say i have a module and in that module i call different procedures (subs or function ) which are located in other modules, how can i list all the procedure names and their module or class in a simple way in case i wanted to copy those procedures to the current module and delete these modules.
thanks
i don't know how to achieve that but here is a dummy code
for each UserDefinedProcedure in UserProcuduresCollection
if UserDefinedProcedure.Name (is Found in this module) then
debug.print UserDefinedProcedure.Name
end if 
next 

A:

DISCLAIMER: I wrote this part of the Rubberduck add-in myself, and I own and maintain the Rubberduck project. 

Download and install Rubberduck. Right-click the procedure name (from its declaration, or any of its usages) and select the "Find all references" command from the code pane context menu:

You can then double-click an item in the list to navigate there.
The latest release dates a little (July 2015), but the project is well alive on GitHub, and version 2.0 should be released in 6-8 weeks. It won't let you iterate procedure/identifier references with VBA code, but a COM API to do exactly that is on the project's roadmap.
Rubberduck 2.0's "find all references" can find references to pretty much anything, from classes:

To properties:

...and library functions:

Doing this with code, even very smart code, using the VBIDE API, isn't going to be reliably possible. The reason for this is that it's perfectly legal to have this code in Module1:
Sub DoSomething()
    'do something
End Sub

And then this code in Module2:
Sub DoSomething()
    'do something
End Sub

To correctly resolve references to DoSomething inside Module1, you need to check whether the call is qualified (e.g. Module2.DoSomething will call the procedure inside Module2 - an unqualified call will call the procedure inside Module1).
Resolving identifier references is something I've spent pretty much an entire year refining the code for, and it's still not perfect (although it now resolves crazy ambiguous code you wouldn't even think is legal VBA) - doing that in plain VBA is suicidal at best.
Eventually we'll expose a COM API that will allow Rubberduck users to write VBA code something like this completely hypothetical code:
For Each declaration In RubberduckParserState.UserDeclarations
    If declaration.DeclarationType = Procedure And declaration.ParentScope = "VBAProject.Module1" Then
        For Each reference In declaration.References
            Debug.Print declaration.IdentifierName " used in " & reference.ToString
        Next
    End If
Next

