ActiveX Listbox - Items disappear after click while code is running (then reappear when complete)

bs0d

Well-known Member
Joined
Dec 29, 2006
Messages
622
I have an ActiveX listbox on my sheet. I have a number of sub routines that run once the user clicks an item in the list. My issue is that once a user clicks an item in the list, the listbox appears empty briefly while the code is running, and the items show back up when the code is done. This takes about a full second. In a perfect world, the listbox does nothing while the code is fetching data. Does anyone have experience resolving this behavior?
 
I've never connected a listbox to another app, so don't know how it works.
I was just thinking that if you are querying the DB again during the Click event, it might be causing the listbox to loose it's data temporarily, hence I suggested writing the data to a sheet to see if you still get the same problem.
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I've never connected a listbox to another app, so don't know how it works.
I was just thinking that if you are querying the DB again during the Click event, it might be causing the listbox to loose it's data temporarily, hence I suggested writing the data to a sheet to see if you still get the same problem.

Ok, it's worth testing. I'll give it a shot.



Thanks,
 
Upvote 0
I have resolved this issue by converting to a MS Form listbox. My only complaint is that the list items appear to be particularly small. I have not identified any way to alter the font size of the ms form listbox.
 
Upvote 0

Forum statistics

Threads
1,223,157
Messages
6,170,420
Members
452,325
Latest member
BlahQz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top