ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox that dont refresh automatically (https://www.excelbanter.com/excel-programming/312912-listbox-dont-refresh-automatically.html)

Freddie[_2_]

Listbox that dont refresh automatically
 
I have a list box that is changes from time to time for each different
case.

here is a simple way to describe it
if case: combobox value = "Atmosphere",
the list box item should be
1. "alpha"
2. "beta"
3. "Gamma"
4. "Terra"

if case combobox value = "Slot",
the list box item should be
1. "one"
2. "two"

so what i did was, for each case i cleared up the listbox and fill in
the items.

but the effect didn't change simultaneously...
it still displays the old value in the screen until you interfere it
with mouse click or minimize/and restore excel again.

i've tried to set the application.screenupdate value to true before
the routines, but it didn't do any good.

is there any other method to refresh the listbox or the whole screen
perhaps?

kind regards

freddie

mark

Listbox that dont refresh automatically
 
Hi,

Try
Listbox.clear

before you reload it

-mark


-----Original Message-----
I have a list box that is changes from time to time for

each different
case.

here is a simple way to describe it
if case: combobox value = "Atmosphere",
the list box item should be
1. "alpha"
2. "beta"
3. "Gamma"
4. "Terra"

if case combobox value = "Slot",
the list box item should be
1. "one"
2. "two"

so what i did was, for each case i cleared up the listbox

and fill in
the items.

but the effect didn't change simultaneously...
it still displays the old value in the screen until you

interfere it
with mouse click or minimize/and restore excel again.

i've tried to set the application.screenupdate value to

true before
the routines, but it didn't do any good.

is there any other method to refresh the listbox or the

whole screen
perhaps?

kind regards

freddie
.



All times are GMT +1. The time now is 12:26 PM.

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