Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Advancing to the next iteration of a loop?
I can't find any way to advance a loop in VB. It won't let you put a NEXT
anywhere by the bottom, and I can see anything like "continue" or "next for". Is this feature really missing??!? Maury |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Advancing to the next iteration of a loop?
What kind of loop??? A Do/Loop??? Post an example of your code.
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Advancing to the next iteration of a loop?
You just have to do something like this:
Sub a() Dim Counter As Integer For Counter = 1 To 10 If Counter = 5 Then GoTo NextLoop Debug.Print Counter NextLoop: Next End Sub -- Jim "Maury Markowitz" wrote in message ... |I can't find any way to advance a loop in VB. It won't let you put a NEXT | anywhere by the bottom, and I can see anything like "continue" or "next for". | Is this feature really missing??!? | | Maury |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Advancing to the next iteration of a loop?
"Jim Rech" wrote:
You just have to do something like this: Ewwwwww. No wonder people whine about this language. Well the good news is I wasn't just being dumb. Maury |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Advancing to the next iteration of a loop?
How's a 'Continue' or a 'Next for' or whatever any better than a goto?
All of them violate the basic premise of good programming: every block of code must have a single entrypoint and a single exit point. One can always use If...Then block. If the nested code is reasonably large use or more subroutines. Every language has its own set of compromises and limitations. If one is so inclined there is something to whine about *every* language ever developed. ;-) -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... "Jim Rech" wrote: You just have to do something like this: Ewwwwww. No wonder people whine about this language. Well the good news is I wasn't just being dumb. Maury |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Advancing the year | Excel Discussion (Misc queries) | |||
Advancing Timing | Excel Discussion (Misc queries) | |||
Advancing Down A List | Excel Worksheet Functions | |||
Iteration loop | Excel Programming | |||
Iteration loop | Excel Programming |