Thread: Loop Problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Umlas, Excel MVP Bob Umlas, Excel MVP is offline
external usenet poster
 
Posts: 320
Default Loop Problem

give the last loop a label, like Continue:
then instead of your Loop, use Go To Continue:
Do While Yadda Yadda
If More Yadda Then
If Still More Yadda Then
GoTo Continue
End If
End If

Continue:
Loop


"Dave Birley" wrote:

I have a construct like this:

Do While Yadda Yadda
If More Yadda Then
If Still More Yadda Then
Loop
End If
End If
Loop

Now, obviously that inner "Loop" can't fire because it can't find a matching
"Do", but I don't want to fire off an "Exit Do" because that sends me outside
the Do..Loop, where some core numeric variables are set, and that isn't what
I have in mind <g!

So, how do I get to the top of the Do..Loop from that inner location?
--
Dave
Temping with Staffmark
in Rock Hill, SC