Option Strict On Option Explicit On Public Class frmMain Private Sub btnCount_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCount.Click Dim num As Integer = 1 'loop until num is greater than or equal to 7 Do While num <= 7 'add number to the list lstNumbers.Items.Add(num) 'increment the control variable num += 1 Loop End Sub End Class