ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   combobox problem (https://www.excelbanter.com/excel-programming/337855-combobox-problem.html)

Ashman

combobox problem
 
Hi all,

I have a problem that I am hoping someone will be able to help me with.

I have a worksheet that have a number of combo boxes on it (all containing
the same information), from with a button on the previous page activates the
worksheet in question and populates the combo boxes. First it clears the
contain. I do not want the value to be erased if there is one. Everytime I
run this procedure the value of the combo boxes are cleared aswell.

I am using sheet2.cbExpectQ1.clear to clear the contents, but as I have
mentioned the value is also erased.

I have tried to record the value, clear everything (including
sheet2.cbExpectQ1.value = "") and after populating the contents I have set
the value. This did not work as it activated the Click event procedure I
have on each combo box, which give a lot of flickering which is not
acceptable.

I am using Excel 2003 on XP. Any help or comments would be much appreciated.

Many thanks in advance.

Ashman

STEVE BELL

combobox problem
 
I'm not sure about combobox events - but you could try turning off events
before you mess with the combobox (and I only work with xl2k)

Application.EnableEvents=False
' do your stuff to the combobox
Application.EnableEvents=True

--
steveB

Remove "AYN" from email to respond
"Ashman" wrote in message
...
Hi all,

I have a problem that I am hoping someone will be able to help me with.

I have a worksheet that have a number of combo boxes on it (all containing
the same information), from with a button on the previous page activates
the
worksheet in question and populates the combo boxes. First it clears the
contain. I do not want the value to be erased if there is one. Everytime
I
run this procedure the value of the combo boxes are cleared aswell.

I am using sheet2.cbExpectQ1.clear to clear the contents, but as I
have
mentioned the value is also erased.

I have tried to record the value, clear everything (including
sheet2.cbExpectQ1.value = "") and after populating the contents I have set
the value. This did not work as it activated the Click event procedure I
have on each combo box, which give a lot of flickering which is not
acceptable.

I am using Excel 2003 on XP. Any help or comments would be much
appreciated.

Many thanks in advance.

Ashman





All times are GMT +1. The time now is 03:37 AM.

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