I'm new to VB and I need to make a program that displays a bar chart of @ symbols into a list box for every 100 that is entered into the input box. This is repeated 4 times and are rounded so that 440 would give 4 @ symbols, and 450 would give 5 @ symbols. Here is my code for retrieving the attendance of each game, I just need help forming a loop that will display the results into the list box named lstChart
.
Private Sub btnChart_Click(sender As Object, e As EventArgs) Handles btnChart.Click
'Retrieve attendance for game 1
Dim strAttendance1 As Integer
strAttendance1 = InputBox("Enter Attendance for Game #1.", "Chart Input")
If strAttendance1 < 0 Then
MessageBox.Show("Attendance must be greater than zero.", "Error")
End If
'Retrieve attendance for game 2
Dim strAttendance2 As Integer
strAttendance2 = InputBox("Enter Attendance for Game #2.", "Chart Input")
If strAttendance2 < 0 Then
MessageBox.Show("Attendance must be greater than zero.", "Error")
End If
'Retrieve attendance for game 3
Dim strAttendance3 As Integer
strAttendance3 = InputBox("Enter Attendance for Game #3.", "Chart Input")
If strAttendance3 < 0 Then
MessageBox.Show("Attendance must be greater than zero.", "Error")
End If
'Retrieve attendance for game 4
Dim strAttendance4 As Integer
strAttendance4 = InputBox("Enter Attendance for Game #4.", "Chart Input")
If strAttendance4 < 0 Then
MessageBox.Show("Attendance must be greater than zero.", "Error")
End If