Hiding and displaying Listboxes through VBA

gjp55

New Member
Joined
Mar 31, 2011
Messages
34
Hi , I have a worksheet that has multiple different listboxes of which at any point will have 3 displayed and the rest hidden (to stop the worksheet looking cramped). This works fine and to display other list boxes, will hide all listboxes and then only display the ones allocated to that button. What I do have though is when I click the button, the listboxes that I want displayed flash for a second in another part of the screen then correctly display in the right position. The listboxes are displayed in the same positions (for example, sales section has 3 listboxes which are displayed when the sales button is selected and have vba to position them in the right positions and the Time section displays 3 listboxes in the same positions as the sales listboxes when selected hiding the Sales listboxes).

Is there a way to stop the listboxes flashing up before they are displayed in the correct position ? - or is this something that just happens when using this sort of functionality ?

Thanks
GJP
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
To avoid the 'flashing' you could try putting Application.ScreenUpdating = False before your listbox code and then Application.ScreenUpdating = True after your listbox code.
 
Upvote 0
Hi Doofusboy,
That didn't work unfortunatley for the listbox issue and still flashes up however, it did resolve another issue I have been working on so thanks very much for your help.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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