Select Value From ListBox with DblClick

Peinecone

New Member
Joined
Oct 20, 2007
Messages
47
I have have a multicolumn listbox that is populated from data on my sheets. What I would like is to dbl click on a row, and get the value from column 1 in the row that is dbl clicked to show on another form. This is what I have so far for the code
Code:
Private Sub lstRecipes_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

    Me.Hide
    frmEditRecipe.Show
    frmEditRecipe.cboRecipeName.Value = Me.lstRecipes.List().Value 'This needs to be the value in column1 of the row that is dbl clicked.
    Unload Me
    
End Sub
The row that populates column 1 is the same data that populates the combobox in frmEditRecipe.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Code:
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    Label1.Caption = ListBox1.List(ListBox1.ListIndex, 0)
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,178
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top