I have setup a Listbox with the following properties: fmListSyleOption, fmMultiSelectMulti, ColumnCount=3. Here is the code:
I'm getting an error that says, "Invalid property array index", when it tries to execute the first Listbox2.List statement. What is wrong and what am I missing?
Code:
For r = 3 To rowCount
If Sheets("Sheet1").Range("B" & r).Value = ComboBox1.Value Then
ListBox2.List(i, 0) = Sheets("Sheet1").Range("B" & r).Value
ListBox2.List(i, 1) = Sheets("Sheet1").Range("C" & r).Value
ListBox2.List(i, 2) = Sheets("Sheet1").Range("F" & r).Value
i = i + 1
End If
Next
I'm getting an error that says, "Invalid property array index", when it tries to execute the first Listbox2.List statement. What is wrong and what am I missing?