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: Stacy Cunningham   on Dec 30

I'm sure there are other ways, butI use Debug.Print statements and
watch the Immediate window.

Put this first in each routine:
Debug.Pring "Enter RoutineName"

Put this last:
Debug.Print " Exit RoutineName"

You can get creative and add these when one routine calls another,
when various milestones are reached. You can indent the text
differently for various levels of subroutine call. You can also print
variable values at times.

This way you have a record of the program flow to examine in
difficult situations.

My code it really peppered with these and that in itself can be a
problem - keeping it all straight. I developed some standards that
help me do this. But, then, I also tend to comment my code out the
wazooo. (:-) working on the code in five years, I'll really
appreciate this.

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: