Hi everybody,
I have a strage problem. I have a Do...While loop. I was wondering if there is anything in VBA similar to the CONTINUE instruction in JAVA or C++ so that I can go back to the beginning of the Do loop midway through the loop without executing the rest of the code based on some test. To make it clear,
Do While Not recordSet.EOF
'Some code here...........
'Some calculations here......
If someVariable = 0 Then
'This is where I want to go back to the beginning _
of the Do Loop without going through the rest of _
the code in the loop.
End If
'Some other code here onwards.
Loop
In JAVA or C++, I could have said CONTINUE and I can go back to the beginning of the loop. Is there anything similar to that in VBA?? Any help or pointers will be greatly appreciated.
Thanks a lot in advance.
Have a great weekend.
Shahnaz.
I have a strage problem. I have a Do...While loop. I was wondering if there is anything in VBA similar to the CONTINUE instruction in JAVA or C++ so that I can go back to the beginning of the Do loop midway through the loop without executing the rest of the code based on some test. To make it clear,
Do While Not recordSet.EOF
'Some code here...........
'Some calculations here......
If someVariable = 0 Then
'This is where I want to go back to the beginning _
of the Do Loop without going through the rest of _
the code in the loop.
End If
'Some other code here onwards.
Loop
In JAVA or C++, I could have said CONTINUE and I can go back to the beginning of the loop. Is there anything similar to that in VBA?? Any help or pointers will be greatly appreciated.
Thanks a lot in advance.
Have a great weekend.
Shahnaz.