Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Error and Loops
If I exit a loop do to an error (On Error) can I then direct control back
into the loop via a GoTo? e.g. On Error GoTo EndofProc For i = 0 to n Resume: ' do stuff Next i Exit Sub EndofProc: i = i + 1 GoTo Resume |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Error and Loops
one way:
On Error GoTo EndofProc For i = 0 To n 'Do Stuff Continue: Next i Exit Sub EndofProc: 'do error stuff Resume Continue End Sub In article , "ThisShouldBeEasy" wrote: If I exit a loop do to an error (On Error) can I then direct control back into the loop via a GoTo? e.g. On Error GoTo EndofProc For i = 0 to n Resume: ' do stuff Next i Exit Sub EndofProc: i = i + 1 GoTo Resume |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
For next loops | Excel Discussion (Misc queries) | |||
Using For - Next Loops in VB | New Users to Excel | |||
Error Handling with Nested Loops | Excel Programming | |||
Error Handling and For-Next Loops | Excel Programming | |||
help with loops | Excel Programming |