Example - Stop Statement
This example of nested loops continues looping until it reaches the stop statement. At that point, z, y, and x are 3, 3, 1 respectively (looping only nine times).
If you remove the stop statement, this loops a total of 27 times.
Sub Main()
Dim x,y,z
For x = 1 to 3
For y = 1 to 3
For z = 1 to 3
MsgBox "Looping " & z & " " & y & " " & x
Next z
Next y
Stop
Next x
End Sub