listbox listindex problem

listbox listindex problem

Post by jaco » Wed, 25 Aug 2004 18:35:41


Hi,
Have a single selection option type listbox which fire
a _Change event. If certain conditions are met the
listindex property is set to -1. The problem I'm having
is that after the listindex property is set to -1 this is
overriden by VB to the listindex representing the new
item selected by the user, thus the listbox is displayed
with an item selected. What I want though is to have no
item selected. Any way around this?

Any help appreciated.
 
 
 

listbox listindex problem

Post by Dick Kusle » Thu, 26 Aug 2004 06:58:30

jacob

Try the BeforeUpdate event instead of Change.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

 
 
 

listbox listindex problem

Post by jaco » Thu, 26 Aug 2004 16:46:01

Thank you.
message

fire
is
displayed