PC Review


Reply
Thread Tools Rate Thread

Delete selected Item from listbox

 
 
Office_Novice
Guest
Posts: n/a
 
      1st May 2008
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      1st May 2008
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" <(E-Mail Removed)> wrote in message
news:E28661A1-1204-4345-A472-(E-Mail Removed)...
> 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 With Quote
 
Office_Novice
Guest
Posts: n/a
 
      1st May 2008
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" <(E-Mail Removed)> wrote in message
> news:E28661A1-1204-4345-A472-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to tell if an item selected in listbox JEM Microsoft Access ADP SQL Server 5 19th May 2008 02:29 AM
ListBox- show selected item as first visible item tony Microsoft Dot NET Compact Framework 1 4th Jun 2007 04:11 PM
how to delete selected item from a multiselect listbox =?Utf-8?B?YmlubmllIHBpbGxhaQ==?= Microsoft Access Form Coding 1 11th Feb 2005 05:16 AM
specifying selected item in a listbox =?Utf-8?B?YW1iZXI=?= Microsoft VB .NET 5 26th Feb 2004 09:45 PM
Get the selected item from a listbox Craig Buchanan Microsoft ASP .NET 0 26th Jun 2003 01:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:14 PM.