How can you make a ListBox RowSource show only visible data from a filtered range and then when the filtered range changes with new filter criteria, show the new visible data?
I Have a Defined Name Range named “Quantity” with the code:
=OFFSET(BuildingMaterial!$B$2,0,0,COUNTA(BuildingMaterial!$B:$B),5)
The Range “Quantity” is filtered with a ComboBox selection with the code:
Private Sub ComboBox24_Change()
Worksheets("BuildingMaterial").Range("M1").Value = ComboBox24.Value
Sheets("BuildingMaterial").Select
ActiveSheet.Range("Combo").AutoFilter Field:=1, Criteria1:=RGB(0, _
176, 240), Operator:=xlFilterCellColor
Sheets("Tom").Select
End Sub
The ListBox is a 5 column MultySelect ListBox on a MultiPage, on a UserForm named ListBox42.
With the RowSource: =Quantity
Right now my ListBox shows all visable and hidden data in the filtered Range “Quantity”.
I Have a Defined Name Range named “Quantity” with the code:
=OFFSET(BuildingMaterial!$B$2,0,0,COUNTA(BuildingMaterial!$B:$B),5)
The Range “Quantity” is filtered with a ComboBox selection with the code:
Private Sub ComboBox24_Change()
Worksheets("BuildingMaterial").Range("M1").Value = ComboBox24.Value
Sheets("BuildingMaterial").Select
ActiveSheet.Range("Combo").AutoFilter Field:=1, Criteria1:=RGB(0, _
176, 240), Operator:=xlFilterCellColor
Sheets("Tom").Select
End Sub
The ListBox is a 5 column MultySelect ListBox on a MultiPage, on a UserForm named ListBox42.
With the RowSource: =Quantity
Right now my ListBox shows all visable and hidden data in the filtered Range “Quantity”.