Avatar of david francisco
david francisco
Flag for United States of America

asked on 

Populating multi column listbox

I have a list box pulling from a work sheet in excel with two columns, and it is populating the first column, but I can't figure out how to make the second column populate as well.

    Dim rngName As Range
    Dim ws As Worksheet
    Dim i As Integer

    Set ws = Worksheets("Equipment")
    For i = 1 To ws.Cells(ws.Rows.Count, 1).End(xlUp).Row Step 1
        If ws.Cells(i, 1).Value <> vbNullString Then Me.ListBox2.AddItem ws.Cells(i, 1).Value
    Next i

Open in new window


Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon