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

I have a do until loop that I want

Status
Not open for further replies.

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

 
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)
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top