Skip to content

Instantly share code, notes, and snippets.

@jda0
Created December 12, 2013 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jda0/7932058 to your computer and use it in GitHub Desktop.
Save jda0/7932058 to your computer and use it in GitHub Desktop.
Public Class Form1
' Form Controls: TextBox TxtLower, TextBox TxtLimit, Button BtnExe, ListBox LstItems
Private Sub BtnExe_Click(sender As System.Object, e As System.EventArgs) Handles BtnExe.Click
Try
Dim l0 As Integer = CInt(TxtLower.Text)
Dim l1 As Integer = CInt(TxtLimit.Text)
LstItems.Items.Clear()
For i As Integer = l0 To l1
LstItems.Items.Add(i)
Next
Catch ex As Exception
MsgBox("Error: Invalid limits")
End Try
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment