QP School

Full Version: Do Until loop in VBA
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Description:

The Do Until loop repeats a block of code until a condition becomes true.

Example:

Sub ExampleDoUntilLoop()
    Dim i As Integer
    i = 1

    Do Until i > 5
        MsgBox "Iteration: " & i
        i = i + 1
    Loop
End Sub