Jun 7, 2002 #1 striker73 MIS Jun 7, 2001 376 US I have a do until loop that I want to stop once it's found what it's looking for. What is the syntax to exit the loop? Do Until (expression) if (expression) then 'exit loop end loop 'iterate Loop
I have a do until loop that I want to stop once it's found what it's looking for. What is the syntax to exit the loop? Do Until (expression) if (expression) then 'exit loop end loop 'iterate Loop
Jun 7, 2002 #2 BanditWk Programmer May 24, 2002 170 US If you're doing a "Do Until (expression)", set the expression. For instance: Do Until X = 10 If "Criteria is met" then X = 10 Else X = X + 1 end if Loop HTH Roy aka BanditWk Las Vegas, NV roy@cccamerica.org RLMBandit@aol.com (private) Upvote 0 Downvote
If you're doing a "Do Until (expression)", set the expression. For instance: Do Until X = 10 If "Criteria is met" then X = 10 Else X = X + 1 end if Loop HTH Roy aka BanditWk Las Vegas, NV roy@cccamerica.org RLMBandit@aol.com (private)
Jun 7, 2002 #3 Tranman Programmer Sep 25, 2001 695 US Striker, The expression to bail out of a Do loop is Exit Do. There is also an Exit Sub, Exit For, Exit Function; etc. Good luck Paul Upvote 0 Downvote
Striker, The expression to bail out of a Do loop is Exit Do. There is also an Exit Sub, Exit For, Exit Function; etc. Good luck Paul