using a worksheet range to populate a combo box in excel
Hi Kev,
set breakboint in your code at line
Me.cboPartsUsed.List = Range(rng.Address,
rng.End(xlDown).Address).Value
and into immediate window (when the code stops), check for the proper
address and values:
?Range(rng.Address,rng.End(xlDown).Address).addres s 'should give you
proper address
?for each cell in Range(rng.Address,rng.End(xlDown).Address) :
debug.print cell.value : next cell 'should print the list of values
If these two checks give you proper address and list of values, then
proceed one step (by pressing F8) and check the combobox for values.
?for i = 0 to Me.cboPartsUsed.List.count - 1 : debug.print
Me.cboPartsUsed.List(0,i) : next i
Let me know the results.
Regards,
Ivan
|