List Box Selections

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please help,

I have a List box from which I want to be able to select multiple options
and from this hide the rows other than the selected rows.

What vba code can I use to do this.

Thanks,
Jez
 
With Me.ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
Range(myData).Offset(i,0).Entirerow.Hidden = True
End If
Next i
End With

This assumes that the listbox is sourced from a range named myData.


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top