PDA

View Full Version : Change properties of a Combobox



vord
07-26-2007, 01:42 AM
In Excel, I am using a comboBox control which currently references a static portion of the spreadsheet for the selectable items included in the pull-down. Now, I want to make the range dynamic -- i.e., if the range of selectable items becomes longer or shorter, that VBA can automatically adjust the properties of the control to include the new range and the "ListRows" property will be adjusted to the same length as the new range.

I look forward to your comments.

rory
07-26-2007, 02:13 AM
The easiest thing to do is to use a dynamic defined name as the ListFillRange and leave the ListRows static - comboboxes look very silly if you set the listrows property too large. Is that acceptable, or do you really want to change the listrows property?
Regards,
Rory