Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conundrum | Excel Discussion (Misc queries) | |||
COUNTIF conundrum | Excel Worksheet Functions | |||
VBA conundrum | New Users to Excel | |||
CheckBox Conundrum | Excel Programming | |||
ISERROR Conundrum | Excel Worksheet Functions |