Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim a As Integer = Val(TextBox1.Text)
        Dim b As Integer = Val(TextBox2.Text)
        Dim c As Integer = Val(TextBox3.Text)

        If TextBox3.Text = "" Then
            c = 1
        End If
        If a > b And TextBox3.Text = "" Then
            c = -1
        End If

        Dim i
        Dim S As String = ""

        For i = a To b Step c
            S = S & i & "   "
        Next

        RichTextBox1.Text = S

    End Sub
End Class
