QP School
Do Until loop in VBA - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: Excel VBA Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=48)
+--- Thread: Do Until loop in VBA (/showthread.php?tid=5216)



Do Until loop in VBA - Qomplainerz - 07-26-2023

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