problem assigning range returned by function, to combobox rowsource
Vasant, thank you for responding. Your change in the strSource
worked! Bless you.
But I'm still having a problem with referencing the second combobox
from code. Maybe you can shed some light on this. I'm new to working
with Excel VBA (experienced with Access VBA, however). I'm not sure
how the referencing works. I have two combo boxes on a sheet which is
code-named 'facility.' Within VBA, I can see the object of the first
combo box when working with the sheet (e.g., if I type in 'Facility.'
I can see cboCompany in the list of objects that belong to the sheet,
but I do not see cboMills (the other combo box) in the list!
Therefore, in trying to set its rowsource property, I had to find by
using a debug.print statement, which shape# corresponded to its name.
Why doesn't the second combo box show up as an object in the
worksheet???
Thanks again,
Kate
Vasant Nanavati wrote:
Haven't worked through the entire code, but perhaps:
strSource = rngSource.Name & "!" & rngSource.Address
should be:
strSource = rngSource.Parent.Name & "!" & rngSource.Address
Also, ControlSource (like RowSource) takes a string parameter rather than a
range parameter.
Just some thoughts ...
|