ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox selection hangs (https://www.excelbanter.com/excel-programming/435956-listbox-selection-hangs.html)

Merlynsdad

Listbox selection hangs
 
When I select an item in a listbox, the selection tends to hang. If I clear
the query information and click on the same item again, nothing happens. I
have to click off the item, and click back on it to get it to work. Also,
sometimes when I select the next item, the last item is still the one
highlighted. What do I need to do to clean this up?

Rick Rothstein

Listbox selection hangs
 
It sounds like this ListBox is being controlled by some code, so I'm
thinking you will need to show us that code before someone here could make
any kind of guess as to what is causing your problem. It would also help us
if you told us where the ListBox is located at... on a UserForm or on a
worksheet? If on a worksheet, where did you get the ListBox at... the
ActiveX Control Toolbox Toolbar or the Forms Toolbar?

--
Rick (MVP - Excel)


"Merlynsdad" wrote in message
...
When I select an item in a listbox, the selection tends to hang. If I
clear
the query information and click on the same item again, nothing happens. I
have to click off the item, and click back on it to get it to work. Also,
sometimes when I select the next item, the last item is still the one
highlighted. What do I need to do to clean this up?



Merlynsdad

Listbox selection hangs
 
I solved my own problem. When I clear the data Ii added the line

lstBox1.listindex=-1

and it works just fine.

"Merlynsdad" wrote:

When I select an item in a listbox, the selection tends to hang. If I clear
the query information and click on the same item again, nothing happens. I
have to click off the item, and click back on it to get it to work. Also,
sometimes when I select the next item, the last item is still the one
highlighted. What do I need to do to clean this up?



All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com