Link to home
Start Free TrialLog in
Avatar of Seamus2626
Seamus2626Flag for Ireland

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
Avatar of Pratima
Pratima
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of p912s
p912s
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Seamus2626

ASKER

Cheers, thats the one i needed!

Seamus
Glad to help!