Delete selected Item from listbox

O

Office_Novice

Okay, i have been trying to figure this out and i am stuck. I have a userform
that uses textbox1.value to find an item in a table. From there the values of
the table populate a listbox using .list(.listcount -1,0)= ....etc.. Anyway
what i would like to have happen is when the user Dbl Click the selected item
in the listbox it clears that item from the list box and leaves the data on
the table. Thanks.
 
B

Bob Phillips

Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With Me.ListBox1

.RemoveItem (.ListIndex)
End With
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Top