RHeilman
Computer
- Nov 22, 2002
- 3
I have a combo box in a worksheet that displays the names and numbers of a list of healthcare providers. I initially typed the range into the properties dialog for that combobox. Whenever new providers are added to the provider list, I need a macro to determine the new range and programmatically update the range in the properties of the combobox.
By recording the actions I found that...
ActiveSheet.DropDowns.Add(239.25, 13.5, 144.75, 24.75).Select
...creates and selects the combobox.
ActiveSheet.Shapes("drop down 1"
.Select
...selects an existing combobox, after which...
Selection.ListFillRange = "$B$1:$B$4"
...updates the range.
The problem is that modifying and executing recorded code is seldom working for me. Does anyone have experience with how to reference the .ListFillRange property (or property that serves the same function) of a combobox?
Thanks,
Ray <><
By recording the actions I found that...
ActiveSheet.DropDowns.Add(239.25, 13.5, 144.75, 24.75).Select
...creates and selects the combobox.
ActiveSheet.Shapes("drop down 1"
...selects an existing combobox, after which...
Selection.ListFillRange = "$B$1:$B$4"
...updates the range.
The problem is that modifying and executing recorded code is seldom working for me. Does anyone have experience with how to reference the .ListFillRange property (or property that serves the same function) of a combobox?
Thanks,
Ray <><