ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combo text value disappears when wkb opens??! (https://www.excelbanter.com/excel-programming/372775-combo-text-value-disappears-when-wkb-opens.html)

hef[_11_]

Combo text value disappears when wkb opens??!
 
Hi,

I haven't been able to find anything on this in the forum.

My situation is that I have a combo box control on a sheet. The combo
list is populated by querying an access db when the combo is activated,
the combo has 3 columns, column 1 is bound (which is linked to a cell
in the wkb), column 2 is user info only, column 3 is set as TextColumn.

It's all working great until I close the workbook and reopen it (after
having saved). When the sheet first pops up the combo displays the
column 3 text value as it did before it was closed, but as the workbook
finished loading all of a sudden the combo loses its text value and
displays the bound value.

I have tried opening the book with macros disabled to see if it is my
code which is causeing the problem, but the result is the same. I also
have another combo on the sheet which only shows one column, the bound
column, and it does not have the same problem, it works just as I would
expect.

If anyone has an idea of what I can do to fix this I would be most
appreciative.

Regards
Henry


Mike Fogleman

Combo text value disappears when wkb opens??!
 
My guess would be to call the macro that does the query to populate the
ComboBox at the WorkBook_Open Event.

Mike F
"hef" wrote in message
oups.com...
Hi,

I haven't been able to find anything on this in the forum.

My situation is that I have a combo box control on a sheet. The combo
list is populated by querying an access db when the combo is activated,
the combo has 3 columns, column 1 is bound (which is linked to a cell
in the wkb), column 2 is user info only, column 3 is set as TextColumn.

It's all working great until I close the workbook and reopen it (after
having saved). When the sheet first pops up the combo displays the
column 3 text value as it did before it was closed, but as the workbook
finished loading all of a sudden the combo loses its text value and
displays the bound value.

I have tried opening the book with macros disabled to see if it is my
code which is causeing the problem, but the result is the same. I also
have another combo on the sheet which only shows one column, the bound
column, and it does not have the same problem, it works just as I would
expect.

If anyone has an idea of what I can do to fix this I would be most
appreciative.

Regards
Henry




hef[_11_]

Combo text value disappears when wkb opens??!
 
Yeah, that would be an option, I can certainly work around it, but I am
confused by the behaviour so I was hoping to see if anyone had an
explanation for it so I could avoid just adding more code.

Thanks for the response.
Henry



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

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