Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi hmm,
Not sure, Helmut, I understand what the code does, or how to implement it. Can you explain it? Thanks. That was probably too simple. I define a boolean variable "myStop". If I want the code to stop, I set "myStop" to true, like Sub Test9987() Dim Mystop As Boolean '! Mystop = True ' your Excel code goes in here if myStop then stop ' more Excel code goes in here if myStop then stop ' more Excel code goes in here End sub If myStop is true then the sub stops at every line "if myStop then stop" If myStop is false, which is the default value, then the code doesn't stop at all. You may even define different boolean variables or an array of booleans, in order to stop only at certain lines, like: Sub Test9987A() Dim Mystop1 As Boolean '! Dim Mystop2 As Boolean '! Mystop1 = True ' your Excel code goes in here if myStop1 then stop ' more Excel code goes in here if myStop2 then stop ' more Excel code goes in here End sub which will stop only at "if myStop1 then stop" HTH -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
breakpoint calculation | Excel Worksheet Functions | |||
Find used range and ignore blank cells when running macro? | Excel Programming | |||
breakpoint affecting the run speed of a macro | Excel Programming | |||
Breakpoint ok, no breakpoint messes up... | Excel Programming |