![]() |
Add a filtered range to a multicolumn ListBox
I have a range("Products") with 4 coulmns of data. The range contains the
header row. The range will be filtered using standard auto filter by a ComboBox on a userform. When the range is filtered, i need to be able to add the filtered items to the multicolumn listbox and keep the header as the listbox header. I can't get it to work right, tia. |
Add a filtered range to a multicolumn ListBox
in case anyone is curious, her's how i did it. listbox name = "lbProducts"
For r = 2 To Range("Products").Rows.Count If Range("Products").Rows(r).Height < 0 Then With Me.lbProducts .AddItem Range("Products").Cells(r, 1).Value .List(.ListCount - 1, 1) = Range("Products").Cells(r, 3).Value .List(.ListCount - 1, 2) = FormatCurrency(Range("Products"). _ Cells(r, 2).Value, 2) End With End If Next note this is 3 columns with the thirs being a dollar value. "Spencer" wrote: I have a range("Products") with 4 coulmns of data. The range contains the header row. The range will be filtered using standard auto filter by a ComboBox on a userform. When the range is filtered, i need to be able to add the filtered items to the multicolumn listbox and keep the header as the listbox header. I can't get it to work right, tia. |
All times are GMT +1. The time now is 12:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com