I'm trying to add items to a listbox, but get a runtime error on the last item:
How to resolve this?
Code:
...
ListBox2.List(i, 0) = Sheets("Sheet2").Range("B" & r).Value
ListBox2.List(i, 1) = Sheets("Sheet2").Range("C" & r).Value
ListBox2.List(i, 2) = Sheets("Sheet2").Range("E" & r).Value
ListBox2.List(i, 3) = Sheets("Sheet2").Range("F" & r).Value
ListBox2.List(i, 4) = Sheets("Sheet2").Range("G" & r).Value
ListBox2.List(i, 5) = Sheets("Sheet2").Range("H" & r).Value
ListBox2.List(i, 6) = Sheets("Sheet2").Range("J" & r).Value
ListBox2.List(i, 7) = Sheets("Sheet2").Range("K" & r).Value
ListBox2.List(i, 8) = Sheets("Sheet2").Range("L" & r).Value
ListBox2.List(i, 9) = ComboBox2.Value
ListBox2.List(i, 10) = ComboBox4.Value
How to resolve this?