I have a VB project for school and it requires to use a loop. I'm trying to test it on my computer but each time I press "OK" on my program the program freezes and nothing is added onto the listbox. The only thing that appears new is the scroll bar on the listbox.
Dim counter As Integer = 0
If total = 5 Then
Do While counter < 5
Marks.Items.Add(studentNumber)
Loop
End If
counter += 1;-). And how willtotalever reach 5? Where is it defined? As this hasn't been part of the posted code, we can't give any suggestion of this may be part of your problem.