Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 224
Default Multi-select listbox - mousedown event

With a multi-select listbox, when the mousedown event fires when a
user clicks one of the boxes, the Selected property reports the
selection state of the list BEFORE the mouseclick. Since I don't know
what box was clicked, I don't know the selection state of any list
items when that event fires; all I know is that the selection state
one of the list items is different than reported by the Selected
property.

The Enter event also fires if the listbox didn't already have focus,
but it has the same problem.

No other events fire when the user clicks one of the boxes, as far as
I can tell.

Is there any way to get the true selection state of the list when the
user clicks one of the boxes in the list?


Thanks,

Greg
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Multi-select listbox - mousedown event

After serious thinking Greg Lovern wrote :
With a multi-select listbox, when the mousedown event fires when a
user clicks one of the boxes, the Selected property reports the
selection state of the list BEFORE the mouseclick. Since I don't know
what box was clicked, I don't know the selection state of any list
items when that event fires; all I know is that the selection state
one of the list items is different than reported by the Selected
property.

The Enter event also fires if the listbox didn't already have focus,
but it has the same problem.

No other events fire when the user clicks one of the boxes, as far as
I can tell.

Is there any way to get the true selection state of the list when the
user clicks one of the boxes in the list?


Thanks,

Greg


Try this...

Private Sub ListBox1_Change()
Debug.Print ListBox1.ListIndex
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 224
Default Multi-select listbox - mousedown event


Doh! Thanks, and pardon my brain fart! :-)

Greg
Reply
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
Multi select Listbox Steve Excel Programming 8 January 3rd 09 07:31 AM
code to parse a multi-colum multi-select listbox Jade Excel Programming 1 September 16th 08 03:47 PM
Listbox Multi Select MikeT Excel Programming 2 July 27th 06 08:25 PM
Select Multi in Listbox - Event Click not working François Excel Programming 0 March 30th 06 07:56 PM
multi select listbox Paul Mueller Excel Programming 2 June 10th 04 09:08 PM


All times are GMT +1. The time now is 12:55 AM.

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

About Us

"It's about Microsoft Excel"