Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default ListBox Conundrum

Hi All

I thought I knew how to manage UserForm listboxes. But clearly not !

On a user form I have a list box that is refreshed from another action. A
user can double-click an item in the list, which causes the list to be
reloaded, the number of items in the refreshed list may change but the item
that was double-clicked will remain but its position may differ.

I had set up some code that records the item chosen and then re-applies this
by setting the ListIndex to the right location. The value generated is
correct but the item is not being selected. It is as if the ListIndex value
is being ignored. The actual and wrong item selected is fixed by the
physical location of the original selected item in the list. Hope this
makes sense.

How do I eliminate the current selection before I reapply my new ListIndex
value? I tried setting the ListIndex to -1 first but that does not work.
Do I need to redraw or something else?

TIA



--

Regards,
Nigel




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default ListBox Conundrum

Post the code.

--
__________________________________
HTH

Bob

"Nigel" wrote in message
...
Hi All

I thought I knew how to manage UserForm listboxes. But clearly not !

On a user form I have a list box that is refreshed from another action. A
user can double-click an item in the list, which causes the list to be
reloaded, the number of items in the refreshed list may change but the
item that was double-clicked will remain but its position may differ.

I had set up some code that records the item chosen and then re-applies
this by setting the ListIndex to the right location. The value generated
is correct but the item is not being selected. It is as if the ListIndex
value is being ignored. The actual and wrong item selected is fixed by
the physical location of the original selected item in the list. Hope
this makes sense.

How do I eliminate the current selection before I reapply my new ListIndex
value? I tried setting the ListIndex to -1 first but that does not work.
Do I need to redraw or something else?

TIA



--

Regards,
Nigel






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
Conundrum Saxman[_2_] Excel Discussion (Misc queries) 7 July 22nd 07 06:09 PM
COUNTIF conundrum mmcap Excel Worksheet Functions 5 February 14th 07 05:44 AM
VBA conundrum csi New Users to Excel 4 October 27th 05 08:02 PM
CheckBox Conundrum Jonathan Excel Programming 2 October 4th 05 02:20 PM
ISERROR Conundrum forumuser - ExcelForums.com Excel Worksheet Functions 1 August 10th 05 03:49 PM


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