cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Dynamic List Boxes

BStump-disabled
1-Newbie

Dynamic List Boxes

I have most of this but need the last bit. I have a table which contains several sub lists. I have a Dynamic list box that will generate a second sub list (sub list of a different column) of values depending on the selection in the first list box. All fine and dandy. Using the same concept I generate a second list box using the results of the previous step. And from the selection of this second list box it generates a result I need. In both list boxes an array is an input, and in the second case it is the result of the previous step. But the second list box input array does not update itself dynamically. I have to attempt to edit the script and then exit for the input to update.

this is a rather useful thing I am attempting and as other will use this worksheet I need the second list box to dynamically update.

So my question is. How can I get the input array to update itself rather that forcing it?

Barry
2 REPLIES 2

Can't be completely sure of what's up, as your sheet doesn't actually work (an unavailable referenced sheet).

The basic situation seems to be that you have carefully used the OnLoad variable to make sure that you only fill the list box once, the first time it is evaluated. That is what prevents it from responding to changes to its input data -- you coded it to do that.

Don't use the Recalculate method in the Exec routine. The purpose of the Recalculate method is to cause a reevaluation of the list box, and so execute the Exec routine. Since you are already executing the Exec routine you don't want to do that. Fortunately in this context it seems to be ignored, logically such a usage represents an endless loop.
__________________
� � � � Tom Gutman

Yes I fixed it by changing the first ONLOAD loop that populates it and that corrected it. Now I have another small problem I will have to fix. I will also change both list boxes to use the metadata storage for the state and selection.
Top Tags