Seamus2626
asked on
List box - only visible entries
Hi,
I have filtered a list for unique entries only, but my code for bring that list into a list box still picks up the hidden rows
Can i change the below code to only import visible entries
Thanks
Seamus
Private Sub UserForm_Activate()
Dim j As String
j = 2
Do While Sheets("Sheet1").Cells(j, 1).value
j = j + 1
Loop
Me.ListBox1.RowSource = "Sheet1!Q2:Q" & (j - 1)
End Sub
I have filtered a list for unique entries only, but my code for bring that list into a list box still picks up the hidden rows
Can i change the below code to only import visible entries
Thanks
Seamus
Private Sub UserForm_Activate()
Dim j As String
j = 2
Do While Sheets("Sheet1").Cells(j, 1).value
j = j + 1
Loop
Me.ListBox1.RowSource = "Sheet1!Q2:Q" & (j - 1)
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers, thats the one i needed!
Seamus
Seamus
Glad to help!
there are some examples
http://www.excelforum.com/excel-programming/782779-show-only-visible-cells-rows-in-listbox.html