Results 1 to 13 of 13

Thread: Lookup using a list box

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    For userform1 you can add some code like this:


    Private Sub lstSelection_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
        MsgBox "You double clicked me. You want to get information on the album " & lstSelection.Text
    End Sub

    This will run when you double click on the listbox. Depending on how you will store the track names you can find them using the listindex properly of the listbox (since that will correspond in some way to the row the data is in).
    Last edited by Aussiebear; 04-29-2023 at 07:19 PM. Reason: Adjusted the code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •