I see a bigger issue than that!
vb Code:
ListBox1.Items.Add(intArray(howmany))
Howmany is the number that people are entering, not an index value. What you need is:
vb Code:
Dim intArray(19) As Integer Dim howmany As Integer Dim count As Integer For count = 0 To 19 'GET VALUE THAT USER ENTERS howmany = CInt(InputBox("Please input how many fish " & ControlChars.CrLf _ & "you caught on each trip.")) 'ASSIGN THE VALUE HOW MANY TO YOUR intARRAY AT THE CURRENT POSITION (0, then 1, then 2 etc...) intArray(count) = howmany 'Place CURRENT intArray value into Listbox - it's the count index that tells us that ListBox1.Items.Add(intArray(count)) 'NO NEED FOR 'COUNT += 1' Next count




Reply With Quote