Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2011
    Posts
    2

    Question Unanswered: Silly question...

    So, I am an experienced programmer and have started to do some VBA coding. It's extremely easy, but I have one stupid problem. I'm editing an existing macro in VBA and in pretty much any IDE I've used (with a real programming language), there is a way to find where a function (sub, etc) gets called in the code. Can I not do this in Excel's editor or is there a shortcut to do it at all?

    Thanks.

  2. #2
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    If you're looking for a bespoke function, try changing the name of it and then compiling the code. Each instance will then be flagged up as an error.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  3. #3
    Join Date
    Nov 2011
    Posts
    2
    That seems ridiculous that it doesn't have that functionality, but if changing the function name is the only way to do it then I guess I'll do it then. Thanks.

  4. #4
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    You're welcome!

    (I didn't say that it was the only way... If your code is restricted to one or two modules, you can also try ^F, but you'd need to search each one.)
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  5. #5
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    I agree with you: it is a hole in the VBA IDE's functionality. The VBA IDE hasn't been updated for 10+ years, so we suffer from this sort of thing.

    I use MZ Tools for this. It's a free and indispensable tool for any VBA programmer which has lots of other useful features.
    Once it's installed, you place the mouse cursor in the procedure and go to Tools > MZ Tools > Procedure Callers, and it gives you a tree showing the callers.
    Last edited by Colin Legg; 11-10-11 at 05:24.

Posting Permissions

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