LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
nested IF statements ssimer Excel Worksheet Functions 3 August 22nd 08 12:47 AM
nested if statements Teethless mama Excel Worksheet Functions 0 March 28th 07 12:23 AM
Nested if statements - is there a better way? masterbaker Excel Worksheet Functions 3 July 25th 06 04:59 PM
Nested If Statements Jasmine Excel Worksheet Functions 2 January 26th 06 03:47 PM
Nested If/Then statements qwik6 Excel Worksheet Functions 3 December 9th 05 03:38 AM


All times are GMT +1. The time now is 09:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"