Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Debug ignoring breakpoints (WinXP/Word2003)

    Could someone tell me what circumstances/settings/etc would cause a template to ignore a breakpoint, running straight through it and running the code as if it wasn't there?!

    I have just found a template that is doing this - it complained of a non-existent property, so I set a breakpoint in order to step through and find out which property, or at least which line is causing the problem, and it just won't!

    I put a msgbox line before it to make it stop and that works, but the moment I clicked ok to continue it whizzes straight on again. Is there a code line to say "if vbno then pause and allow step through from this point" ie a code line to act as a breakpoint?

    This set of templates is driving me absolutely crazy!
    Beryl M


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Debug ignoring breakpoints (WinXP/Word2003)

    You can use the instuction

    Stop

    to make code pause - it acts (or should act) the same as placing a breakpoint. You can make the pause conditional by using an If ... Then statement:

    If condition Then
    Stop
    End If

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Debug ignoring breakpoints (WinXP/Word2003)

    Hmm - now that's a very useful little command to know! I haven't tested it on my problem template yet, but it certainly does work as a breakpoint on a well-behaved template.

    Let's hope it does the same on the problem one, when I get a chance to try it - which might not be until next week, as one of my cats is due to have kittens tomorrow and I'm having kittens at the thought!

    Thanks, Hans!
    Beryl M


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •