View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Robert Flanagan Robert Flanagan is offline
external usenet poster
 
Posts: 71
Default How to prevent list item selection

Ron and JLG, the list box is on a user form. I have the list index set
initially at -1. But the list box is clickable and the user can select any
item. I can trap the mouse up event and change the list index back to -1,
but the item clicked is still blue. Repaint doesn't change the item to
unselected.

The only solution I have found is to set up a Do..Loop and hide and reshow
the form via the mouse up event and a public variable. The mouse up event
sets the variable to reshow and to hide the form. And setting the listindex
back to -1. This just doesn't seem like an elegant solution <grin.

Bob

"Robert Flanagan" wrote in message
...
I'm having one of those blond moments (no offense to any blonds). I have
a simple list box to display information. I want to immediately unselect
any item that is selected. None of the obvious items I've tried worked.
Any suggestions?