View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stratuser Stratuser is offline
external usenet poster
 
Posts: 63
Default Jumping Out of Nested Statements

I have a block containing several levels of nested statements within a For
Each...Next loop. I'm using a GoTo statement to make execution jump to the
end of the loop. It works, but I'm wondering if there isn't a better way to
do this, because I've read that you should not use line numbers to jump
around inside a subroutine. Any ideas? Here's the structure of the code:

For Each X in Range("TickerList")
If ....
With .....
Select Case True
Case ...

Case ...
If ....
GoTo 15 'from here i want to jump
to Next X
End If
End Select
End With
End If
Next X