Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upgrading from Word 97 to 2003 - Not stopping at breakpoints

Status
Not open for further replies.

grannyM

Programmer
Nov 26, 2002
39
0
0
US
We're upgrading from Word 97 to Word 2003. In 97 I could open a template, open the vb editor, make some changes in the code, (not saving them in case they were incorrect), put in some breakpoints, then go to File/New/General/ select my template, test run the macro and it would stop at my set breakpoints. When I test a macro in 2003, it doesn't stop at the set breakpoint. It's like it's opening the saved version of the macro instead of running the one I already have open. I don't want to just hit run because I don't want the macro to insert data into my master template. Is there some setting that needs to be changed in Word 2003 that I'm missing?

Thanks for your help
 
Not sure that's the best approach to begin with. . .

You can always just use the Stop statement. One approach that some people use is to define a global boolean variable called "DebugMode". Then, wherever they want their code to break, they insert a line like:
Code:
If DebugMode Then Stop
When you're programming, just set DebugMode to true in the Immediate window (or from a simple sub).

Hope that's helpful. . .

VBAjedi [swords]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top