If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Silly question...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-11, 21:45
mmcdon16 mmcdon16 is offline
Registered User
 
Join Date: Nov 2011
Posts: 2
Question 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.
Reply With Quote
  #2 (permalink)  
Old 11-09-11, 09:58
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 448
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.
Reply With Quote
  #3 (permalink)  
Old 11-09-11, 12:13
mmcdon16 mmcdon16 is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 11-09-11, 13:42
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 448
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.
Reply With Quote
  #5 (permalink)  
Old 11-10-11, 04:21
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
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.
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA

Last edited by Colin Legg; 11-10-11 at 04:24.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On