+ Reply to Thread
Results 1 to 3 of 3

Listbox Mouse Down Event

  1. #1
    Registered User
    Join Date
    11-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    45

    Listbox Mouse Down Event

    Good evening,

    I am having trouble finding an event to trigger the mouse click in a listbox. I tried using the Mouse Down event however the event doesn't change selections before firing. I need the list index to change when the event is fired so that I can reference the list index of the item that I selected with the event. Currently when the event is fired, it references the list index of the item that was selected before the Mouse Down event. Does anyone have any ideas how I can use the Mouse Down event to reference the new item's list index that is selected with the mouse click?

    I have a sample workbook that demonstrates what I am referring to.

    Thanks for the help!


    This is the sample code I use in the workbook:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Listbox Mouse Down Event

    change it to listbox1_change instead of mousedown

    or mouseup works too
    Last edited by humdingaling; 04-19-2013 at 03:03 AM. Reason: _ instead of .

  3. #3
    Registered User
    Join Date
    04-12-2013
    Location
    Dresden, Germany
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Listbox Mouse Down Event

    One more option would be to change the first line to use click event.
    Private Sub ListBox1_Click()

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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