Listbox multiple column advice

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,738
Office Version
  1. 2007
Platform
  1. Windows
I have the code in use below but im only getting the first column values.
Do you see an issue with the 2nd & 3rd

Thanks

Rich (BB code):
Private Sub UserForm_Initialize()
    Dim rng As Range, cel As Range
For Each cel In Range("F6", Range("F" & Rows.Count).End(xlUp))
    If IsEmpty(cel) Then
        With Me.ListBox1
            .ColumnCount = 3
            .ColumnWidths = "100;150;90"
            .AddItem
            .List(.ListCount - 1, 0) = cel.Offset(, -5).Value
            .List(.ListCount - 1, 2) = cel.Offset(, -8).Value
            .List(.ListCount - 1, 3) = cel.Offset(, -11).Value
        End With
    End If
Next cel

    '-------------------------------
    Me.StartUpPosition = 0
    Me.Top = Application.Top + 50  ' MARGIN FROM TOP OF SCREEN
    Me.Left = Application.Left + Application.Width - Me.Width - 440 ' LEFT / RIGHT OF SCREEN
   
    '-------------------------------

End Sub
 
I mentioned i am unabnle to decipher what the code represents.

Rich (BB code):
 .List(.ListCount - 1, 0) = cel.Offset(, -5)

Explain please then.
- 1,0 ???

-5 ?????

I understand column row & cell value etc bhut what i altered made no difference to the listbox
 
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top