ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ComboBox Question (https://www.excelbanter.com/excel-programming/279928-combobox-question.html)

Terry Detrie

ComboBox Question
 

I'm working with ComboBoxes (the ones from Controls, not the ones from
Forms). I've defined the ListFillRange as a dynamic range called
Drop_IR. When I first set up the ComboBox, Drop_IR had 42 rows. I've
added 4 rows to this data range (I've checked the size with
Insert...Name...Define that the range is indeed 46 rows now) but the
ComboBox won't display the new entries.


When I delete the Drop_IR reference for the ListFillRange and then
retype it in, it lists 46 rows. I've also noticed that when I save,
close, and reopen the file, the "dynamic" range updates itself. Is
this an Excel bug or am I doing something wrong?

Terry Detrie

Vasant Nanavati

ComboBox Question
 
Terry, what you described works perfectly for me in Excel 2002. What version
are you using?

Regards,

Vasant.

"Terry Detrie" wrote in message
...

I'm working with ComboBoxes (the ones from Controls, not the ones from
Forms). I've defined the ListFillRange as a dynamic range called
Drop_IR. When I first set up the ComboBox, Drop_IR had 42 rows. I've
added 4 rows to this data range (I've checked the size with
Insert...Name...Define that the range is indeed 46 rows now) but the
ComboBox won't display the new entries.


When I delete the Drop_IR reference for the ListFillRange and then
retype it in, it lists 46 rows. I've also noticed that when I save,
close, and reopen the file, the "dynamic" range updates itself. Is
this an Excel bug or am I doing something wrong?

Terry Detrie




Tom Ogilvy

ComboBox Question
 
Vasant has said it works in Excel 2002, but in my experience, in earlier
versions, the combobox does not update when the defined name gets redefined.
The things you describe cause the listfillrange to be set, so this uses the
latest definition of the defined name. One way to work around this would be
to have code that would reset the listfillrange. Which event to use to do
this would depend on usage.

As far as a bug, the msforms 2.0 controls are not part of the Excel object
model and aren't updated by Excel's internal calculation. You might call it
a design flaw.

--
Regards,
Tom Ogilvy

Terry Detrie wrote in message
...

I'm working with ComboBoxes (the ones from Controls, not the ones from
Forms). I've defined the ListFillRange as a dynamic range called
Drop_IR. When I first set up the ComboBox, Drop_IR had 42 rows. I've
added 4 rows to this data range (I've checked the size with
Insert...Name...Define that the range is indeed 46 rows now) but the
ComboBox won't display the new entries.


When I delete the Drop_IR reference for the ListFillRange and then
retype it in, it lists 46 rows. I've also noticed that when I save,
close, and reopen the file, the "dynamic" range updates itself. Is
this an Excel bug or am I doing something wrong?

Terry Detrie





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

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