Hi,
This is Excel 2010 with an ActiveX combobox on a worksheet.
The combobox gets its values from a named range on a different worksheet in the same workbook. I have a command button that runs a routine to refresh the size and contents of the named range. That routine goes out to another workbook, and copies new values and brings them back into the named range. After doing that, it resizes the named range (row count could be greater or less than before) to fit the new data. The names manager confirms that the range name is properly updated with the new range size.
Immediately after refreshing the named range, the combo box does not accurately reflect the range's new contents. If the range is smaller than before, the combo box will show blank lines; if the range is larger than before, the combobox does not show all entries. Sometimes the combobox shows everything but not sorted the way the source table is sorted.
However, if I close (save) and then re-open the workbook, the combobox always shows the correct contents, properly sorted.
Two questions: why is this happening? Is there some easy way in code to force the combobox to refresh properly?
Thanks,
Peter.