I see. You didn't mention it's a listbox
Replace both
outputBox.Text = outputBox.Text & MyIntArr(i).ToString & ", "
lines in Button_Click handlers with
outputBox.Items.Add(MyIntArr(i))
and it works. ListBoxes are populated a bit differently than TextBoxes.
And you clear a ListBox with
outputBox.Items.Clear instead of
outputBox.Text = ""
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Offline 1,024 posts
since Aug 2008