Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default exit for next loop

Is there a command to "Exit" a for next loop ?
Thanks in advance
David

Values = False
Dim ofcells As Range
For Each ofcells In Range("myrange")
If ofcells.Value < 0 Then
Values = True
Can I exit loop from here

End If
Next
to carry on from here



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default exit for next loop

I think it is "exit for"

"David Henderson" wrote:

Is there a command to "Exit" a for next loop ?
Thanks in advance
David

Values = False
Dim ofcells As Range
For Each ofcells In Range("myrange")
If ofcells.Value < 0 Then
Values = True
Can I exit loop from here

End If
Next
to carry on from here




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default exit for next loop

Surprise! "Exit For" is the way to exit a FOR... statement group.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exit to the beginning of For Next loop CousinExcel Excel Discussion (Misc queries) 3 May 13th 10 01:03 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
exit from a loop? Kieran1028[_5_] Excel Programming 0 November 10th 04 02:55 PM
exit from a loop? crispbd[_23_] Excel Programming 0 November 8th 04 09:22 PM
If a called sub exit, how to the caller exit right away? luvgreen[_4_] Excel Programming 4 February 24th 04 05:06 PM


All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"