+ Reply to Thread
Results 1 to 4 of 4

Selecting a listbox item event

  1. #1
    Todd Huttenstine
    Guest

    Selecting a listbox item event

    Hey

    I want to have a code run when a user selects any item in my listbox
    (Listbox1). How can I make this happen?


    Thanks
    Todd Huttenstine


  2. #2
    Bob Phillips
    Guest

    Re: Selecting a listbox item event

    Get the Listbox_Click event.

    --
    HTH

    Bob Phillips

    "Todd Huttenstine" <[email protected]> wrote in message
    news:[email protected]...
    > Hey
    >
    > I want to have a code run when a user selects any item in my listbox
    > (Listbox1). How can I make this happen?
    >
    >
    > Thanks
    > Todd Huttenstine
    >




  3. #3
    Nick Hebb
    Guest

    Re: Selecting a listbox item event

    Assuming it's a listbox on a worksheet, then right-click on it in
    design mode and select 'view code' from the context menu. That will
    launch the VBA IDE and create a Listbox1_Change event procedure.


  4. #4
    Chip Pearson
    Guest

    Re: Selecting a listbox item event

    You need to use the Click event of the ListBox. E.g.,

    Private Sub ListBox1_Click()
    MsgBox "You clicked: " & Me.ListBox1.Value
    End Sub



    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Todd Huttenstine" <[email protected]> wrote
    in message
    news:[email protected]...
    > Hey
    >
    > I want to have a code run when a user selects any item in my
    > listbox
    > (Listbox1). How can I make this happen?
    >
    >
    > Thanks
    > Todd Huttenstine
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1