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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.