ListBox Conundrum

N

Nigel

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
 
N

Nigel

Hi Bob
I have investigated further and abandoned this approach. It appears I
cannot fix this problem the way I have configured it.

Thanks for your reply

--

Regards,
Nigel
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top