I have a userform with a Listbox. I want to add items to it using List
.
I get a syntax error when it comes to the List
function. I can't get the property List.
Private Sub UserForm_Initialize()
Dim lRow As Long
Dim i As Long
With Me.lsbVarden
.Clear
.ColumnHeads = False
.ColumnCount = 3
.ColumnWidths = "70;70;10"
lRow = Cells(Rows.count, 1).End(xlUp).Row
For i = 1 To lRow
.AddItem
.List(i, 0) = Cells(i, 2).Value
.List(i, 1) = Cells(i, 3).Value
.List(i, 2) = Cells(i, 3).Row
Next i
.MultiSelect = fmMultiSelectExtended
End With
End Sub