A
Alon
Hi,
I have two comboboxes on a VBA form that use dynamic range names for
their RowSource data. Esentially when you select something from the
first combo box, I have it set a cell to the selected value using
controlsource which in turn changes a list on the sheet that was used
in the row source for the second combo box. I have two problems here:
1. When selecting a new item in the first combo box the value in my
excel sheet only updates when I take focus away from the combo box.
This gives the function a very non-dynamic feel.
2. The data from the rowsource does not refresh for the second combo
box. I tried setting row source again in the change event of the combo
box but due to my first issue this does not work since each time I
change something I have to take away focus so that the data updates in
excel, and then change it again so that it reloads the data. When I do
that it leads to a run-time error.
The only thing that comes to mind is to build two separate functions
that will perform the same operations that rowsource/controlsource do
but do it the way I want them to. I want to avoid doing this and use
what is available in excel without complicating the code even more.
Any suggestions?
Thanks,
Alon
I have two comboboxes on a VBA form that use dynamic range names for
their RowSource data. Esentially when you select something from the
first combo box, I have it set a cell to the selected value using
controlsource which in turn changes a list on the sheet that was used
in the row source for the second combo box. I have two problems here:
1. When selecting a new item in the first combo box the value in my
excel sheet only updates when I take focus away from the combo box.
This gives the function a very non-dynamic feel.
2. The data from the rowsource does not refresh for the second combo
box. I tried setting row source again in the change event of the combo
box but due to my first issue this does not work since each time I
change something I have to take away focus so that the data updates in
excel, and then change it again so that it reloads the data. When I do
that it leads to a run-time error.
The only thing that comes to mind is to build two separate functions
that will perform the same operations that rowsource/controlsource do
but do it the way I want them to. I want to avoid doing this and use
what is available in excel without complicating the code even more.
Any suggestions?
Thanks,
Alon