07-20-2010, 03:20 PM
I kept i and j in comment to highlight/distinguish which "Next" is for which loop as per coding standard. One serves as inner loop and other one is outer loop.
In my above code For i = ... is outer loop and For j = ... is inner loop. So the First "Next" is end of For j loop and 2nd "Next" is end of For i loop.
Hope this clarifies your question.
In my above code For i = ... is outer loop and For j = ... is inner loop. So the First "Next" is end of For j loop and 2nd "Next" is end of For i loop.
Hope this clarifies your question.
Code:
For i = 1 to a
For j = 1 to b
....
Next ' j
Next ' i