View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Incrementing Do/Loop, For/Next and For/Each

just use an if...then block to wrap the code you might want to skip, and
test for the "skip" condition in that block.

--
Tim Williams
Palo Alto, CA


"Steve Drenker" wrote in message
...
I've got several loops where I discover midway through the loop that I

don't
want to process the remaining commands before the "Loop" or "Next" at the
end of the loop. I DO NOT want to exit the loop -- just increment the
counter and process the next loop for next incremented variable.

I know that variables such as "i" in For i = 1 to 100 can be incremented
mid-loop, but this is not advisable.

Is there a way to skip to the bottom of a loop without using a GoTo
statement? Or is that the only way?

The Exit For command is no good because I want to continue processing the
remaining elements, not end the loop.

TIA
Steve

Sdrenker <is at pacbell <with a dot net