Do-Until loop with condition at the end of the loop

The loop does not require a running variable. The loop is looped as long as the cancellation condition is not  met. The loop is looped at least once.

The loop can be aborted prematurely with the Exit Do command.

The loop can be continued immediately with the Continue command.

 

Dim i As Long, k As Long

i := 0

Do

   k := k + 100

   If k > 1000 Then

      Exit Do

   End If

   i := i + 1

End Do Until i > 100