943,733 Members | Top Members by Rank

Ad:
Jul 10th, 2008
0

debugging word 2003 vba macros

Expand Post »
This is pertaining to debugging VBA macros for Word 2003. I am debugging a document with a LOT of buttons which launch macros. If I place a breakpoint in a subroutine, and execute the macro by running it from the VBE debugger, execution stops at the breakpoint. But is there a way to have the VBE debugger launched as soon as I call a macro from a document even if VBE is not open, e.g. if buttons a, b, c, ... z launch macros then I want to open the document, click on a, b, or c, ... z and have the appropriate macro code for a, b, ... appear in the VB Editor window. The only way I could think of is putting a divide by zero error at the beginning of each macro, and selecting debug when the error msgbox pops up. One problem is I'm not even sure which macros are being run by each button because there are so many template files/macro names, and some of the macro names are the same in different templates. It would be so much easier if I could specify that any macro being run should automatically pop up in the VBE.
Reputation Points: 11
Solved Threads: 0
Newbie Poster
drichird is offline Offline
16 posts
since Sep 2007
Jul 10th, 2008
0

Re: debugging word 2003 vba macros

you can always see the name of the button by going to the properties of that button. then going into the debugger and looking for that name
Reputation Points: 10
Solved Threads: 4
Junior Poster in Training
bushman_222 is offline Offline
65 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Elow nid Help here
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Code to monitor port 135 on windows OS





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC