when a listbox multi-select is set to none

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know how to create a vb routine to clear a listbox when it's multi-select
is set to "simple" or "extended"

but....

how do I create a routine either in a button, or in an event to clear a
simple (one at a time) listbox?
 
I didn't clarify, I'm sorry... I need to clear -selections- not items.
After I select any item, it seems impossible to clear the selection of a
listbox that only allows one selection at a time.

Otherwise, in a multi-select (simple or extended) listbox, you could just
refer the rowsource to itself and the listbox selections would be clear.
 
(Sorry, I replied to myself)
I didn't clarify, I'm sorry... I need to clear -selections- not items.
After I select any item, it seems impossible to clear the selection of a
listbox that only allows one selection at a time.

Otherwise, in a multi-select (simple or extended) listbox, you could just
refer the rowsource to itself and the listbox selections would be clear.
 
Yes. It does. It worked with a button. Thanks.
I was trying to incorporate it with a textbox that shows the user a matching
item in the listbox (like the way a combo box works)

I wanted to incorporate your solution when len(search_textbox) = 0
For example: As the user types, if the selection is in the listbox it
scrolls to that item, but if the user backspaces completely in search_texbox,
it should CLEAR all selections in the listbox.

For some reason, it doesn't work.
 
Back
Top