Hello all experts,
I urgently need a solution to show Filtered data in a Form. A Listbox in a Form is required to display the filtered data.
It shows all data inside the Listbox but is not able to show the filtered data.
In "worksheet1", I need to filter column A with a different user name, how can I do it. Please help.
Sub filter_data()
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("worksheet1")
Dim Lr As Long
Lr = Sheets("worksheet1").Range("A" & Rows.Count).End(xlUp).Row
With Me.ListBox1
.ColumnCount = 8
.ColumnHeads = True
.ColumnWidths = "20,40,40,40,40,40,40,40,20"
.RowSource = "worksheet1!A2:H" & Lr
End With
End Sub
Thank you very much,
Curiousyoung60
Bookmarks