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

Can you skip a DO WHILE iteration?

Status
Not open for further replies.

BigM

Programmer
Aug 30, 2000
39
GB
Hi,

I have a Do While Loop in which I make certain tests on the data I am processing. Is it possible to tell the loop to skip the current iteration and start processing from the start of the loop for the next iteration. Code as below

Do While objFileTextStream.AtEndOfStream <> True
If Whateva Then
Skip Command Here......
End If

More processing here..ignored if above equates true
Loop

I know I could do ELSE etc but am wanting to avoid creating nested ifs etc

TIA
[sig][/sig]
 
Do While objFileTextStream.AtEndOfStream <> True
If Whateva Then
GoTo NoDo
Skip Command Here......
End If

More processing here..ignored if above equates true

NoDo:
Loop
[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top