M Mike H Oct 11, 2003 #1 how can I jump out of a for next loop before I get to the top of the series of numbers?
F Frank Isaacs Oct 11, 2003 #3 Check out Exit in the online help; it's used for this situation (Exit For) as well as others (Exit Do, Exit Sub, Exit Function, etc.). -- HTH - -Frank Isaacs Dolphin Technology Corp. http://vbapro.com
Check out Exit in the online help; it's used for this situation (Exit For) as well as others (Exit Do, Exit Sub, Exit Function, etc.). -- HTH - -Frank Isaacs Dolphin Technology Corp. http://vbapro.com
C Chrissy Oct 11, 2003 #4 Rethink your loop control. Maybe you should not be using a for next loop - maybe a do while loop would be better. Chrissy.
Rethink your loop control. Maybe you should not be using a for next loop - maybe a do while loop would be better. Chrissy.
T Tom Ogilvy Oct 11, 2003 #5 for each cell in Range("A1:A200") if isempty cell then exit for ' code to execute Next for i = 1 to 1000 if [test condition] then exit for ' code to execute Next i
for each cell in Range("A1:A200") if isempty cell then exit for ' code to execute Next for i = 1 to 1000 if [test condition] then exit for ' code to execute Next i