Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Gwen Fields   on Dec 30 In MS Office Category.

  
Question Answered By: Gilberto Thompson   on Dec 30

To add to the others comments... There is no easy current way to identify
which procedure  is running  without adding at least one line of code per
procedure.

If you have a lot of procedures then this can be a real PITA!

Fortunately there are ways to automate the process but some of them can be a
bit contrived. It *is* possible to write VBA code to go through every module
and put code into the code... As it is possible to write code to delete that
code.

There are caveats for doing this though and if you want to go there I can
explain further.

Then there are 3rd party programs. I can totally recomend MZTools, version 3
of which... Though now out of date... Is free and still works beautifully.
This will allow you to enter whole bunches of code with a click as well as a
whole bunch of other stuff.

There are advantages to both Debug.Print and using the status bar. A
disadvantage to using the status bar is that it doesn't leave you anything
to look at after.

Then you can add line numbers while debugging if you like and report the
line number you're on... Actually I've not used that in VBA so I don't know
if it still works.... Hmmmm... Time for a google session!

A disadvantage to Debug.Print is that it has a limited amout of space so you
may think you have the whole history but you don't!

You can comment whole sets of debug.Print statements out in one go though.

It's also possible to use conditional "compiling" so that you leave code in
but it only gets run if a certain switch is set.

But I'd first look how many procedures we are dealing with. Is it 30 or is
it five. Five is manageable by hand but 30 is starting to get into seriously
boring repetition :-)

Let us know how you get on or if you want more info.

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Identifying which procedure is running Or get search suggestion and latest updates.


Tagged: