PDA

View Full Version : Solved: ComboBox & Dynamic Arrays



bbk5
07-13-2007, 07:01 AM
I want to have a ComboBox point to a dynamic array in one of my modules so that when the array is changed, the list in the ComboBox will reflect these changes.

Right now, I'm setting the Combobox's List property to the dynamic array and I see all of the initial values of the array in the list. However, when the array's contents is changed during run-time, they are not propagated to the ComboBox's list.

Is there anyway to set something like this up so the ComboBox is basically pointing to the array and not simply copying the values from it at initalization? I've got a alot of ComboBoxes that need to have these same values and would rather not to have to update each ComboBox's list when something in the array changes.

Thanks!

mvidas
07-13-2007, 07:05 AM
Unfortunately you can't do that exactly.. you can either set the .List=array every time the array changes, or put the array to a spreadsheet and have the combobox pull from the rowsource. No way to directly link the two though

Norie
07-13-2007, 07:09 AM
How exactly is the range being changed at runtime?

Is it done through code in the userform?

bbk5
07-13-2007, 07:15 AM
Yea, I'm changing the values in the array through code. But, I guess I'll end up just resetting the list property of each combobox for the time being.

Thanks for letting me know it can't be done the way I was envisioning.