The Address Book Userform (Userform’s Listbox Contains 12 Column)
A follower of the blog wanted this example.
Maximum 10 columns can be added to the listbox with ListBox1.AddItem Method.
To solve this problem, we have filled the listbox an array.
m = m + 1
ReDim Preserve myarr(1 To 12, 1 To m)
For j = 1 To 12
myarr(j, m) = .Cells(k.Row, j + 1).Value
Set k = .Range(“B2:B” & Cells(Rows.Count, “B”).End(xlUp).Row).FindNext(k)
Loop While Not k Is Nothing And k.Address <> adrs
ListBox1.Column = myarr
Also we added a new macro to avoid duplicate data entry in Column B.