Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default listbox listindex problem

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default listbox listindex problem

jacob

Try the BeforeUpdate event instead of Change.

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

"jacob" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default listbox listindex problem

Thank you.
-----Original Message-----
jacob

Try the BeforeUpdate event instead of Change.

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

"jacob" wrote in

message
...
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.



.

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
Userform problem (Listindex) jgmiddel Excel Discussion (Misc queries) 1 April 26th 06 01:34 PM
listindex Steph[_3_] Excel Programming 1 June 25th 04 06:14 PM
ListIndex Todd Huttenstine Excel Programming 2 May 13th 04 04:21 PM
ListBox problem Mike Fogleman Excel Programming 3 December 29th 03 12:23 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 09: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"