LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Double click item in Listbox to select item and close Listbox

Hi Gus

You could do it using code like that listed below

Option Explicit
Dim LstSelection As String

Private Sub CommandButton1_Click()
Call DoYourThingHere
End Sub

Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Call DoYourThingHere
End Sub

Sub DoYourThingHere()
LstSelection = ListBox1.Value
MsgBox LstSelection
ListBox1.Visible = False
End Sub

hope this helps

S

 
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
ListBox3.ListIndex = ListBox3.ListCount -- How to select the last item in a Listbox? [email protected] Excel Programming 2 March 8th 07 01:14 AM
listbox add item Baha Excel Programming 0 December 8th 06 02:37 AM
Need selected item from listbox after double click [email protected] Excel Programming 1 February 23rd 06 03:18 PM
select listbox item automatically ilyaskazi[_71_] Excel Programming 3 September 14th 05 12:27 PM
Select an item in a listbox using code Fred Jacobowitz Excel Programming 2 August 23rd 04 03:27 AM


All times are GMT +1. The time now is 01:21 AM.

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

About Us

"It's about Microsoft Excel"