QP School
For...Next 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: For...Next loop in VBA (/showthread.php?tid=5214)



For...Next loop in VBA - Qomplainerz - 07-26-2023

Description:

The For loop is used to execute a block of code a specified number of times.

Example:

Sub ExampleForLoop()
    Dim i As Integer

    For i = 1 To 5
        MsgBox "Iteration: " & i
    Next i
End Sub