Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Delete selected Item from listbox

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Delete selected Item from listbox

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)

"Office_Novice" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Delete selected Item from listbox

Thanks, Bob i new it was somthing easy. Just too early for me.

"Bob Phillips" wrote:

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)

"Office_Novice" wrote in message
...
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the index in VBA of the selected item in a ListBox Stefan Mueller[_2_] Excel Programming 4 July 16th 07 07:19 PM
Need selected item from listbox after double click [email protected] Excel Programming 1 February 23rd 06 03:18 PM
How to copy selected listbox item to sheet michdan Excel Programming 1 July 14th 05 12:49 PM
Listbox - write newly selected item back to the worksheet Cheryl Excel Programming 0 July 23rd 04 01:56 PM
Count number of selected item in Listbox Todd Huttenstine Excel Programming 4 June 14th 04 06:54 PM


All times are GMT +1. The time now is 09:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"