QP School

Full Version: For...Next loop in VBA
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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