ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AddItems to a list box (https://www.excelbanter.com/excel-programming/345214-re-additems-list-box.html)

chijanzen

AddItems to a list box
 
Spencer Hutton:


Private Sub UserForm_Initialize()
With Worksheets(1)
Set UserRange = .Range("A2:A" & .Range("A65536").End(xlUp).Row). _
SpecialCells(xlCellTypeVisible)
For Each rng In UserRange
Me.ComboBox1.AddItem rng.Value
Next
End With
End Sub

--

http://www.vba.com.tw/plog/


"Spencer Hutton" wrote:

is there a way to add filtered items to a list box. for example, in column
A, add the visible items in the cells to the list box after the range is
filtered.



All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com