Ciclo FOR

Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'CICLO FOR ANIDADO

        Dim variable1 As Integer   'Declaración de las variables.
        Dim variable2 As Integer

        For variable1 = 0 To 2
            MsgBox("Ciclo externo,variable1: " + variable1.ToString)
            For variable2 = 0 To 3                                          'Este ciclo mostrará primero la variable1,después ejecutará el ciclo interno hasta que finalice y volverá al externo de nuevo.
                MsgBox("Ciclo interno,variable2: " + variable2.ToString)
            Next
        Next
    End Sub
End Class

for