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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placing a stop in code for debugging 1

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
I have a loop that is not working correctly. I need to put a stop so I can debug it is there a way of doing that?

Code:
For R3 = 1 To Range("G" & R2) > 0
        If Range("H" & R3 + 1).Value = 0 And BUY1 < BUY2 Then Range("J" & R3).Value = ("Buy at " & Format(BUY3, "0.00") & " or less")
        
         Next R3
 


Just use a BREAK. See the Debug Menu Break Icon.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
You can check the loop range too. You loop to ]b]Range("G" & R2) > 0[/b], which can be either True or False. In both cases the code inside loop does not execute.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top