TTom
Well-known Member
- Joined
- Jan 19, 2005
- Messages
- 518
ComboBox RowSource assignment by procedure code:
In a module sub I want to have code that assigns the RowSource value to a named ranged prior to
showing the UserForm that contains the ComboBox where the RowSource is to be filled.
(This will fill the ComboBox with named range data.)
The following code gets an error as invalid. Is RowSource assignment by code not allowed for Comobox, or do I just need to tweak my code?
Thanks for any tips. TTom
<code>
ActiveWorkbook.Names.Add Name:="nrng_Jobs", RefersTo:="=Sheet2!$T$1:$T$" & Range("T6000").End(xlUp).Row
ufJobSelect.cbxJobSelect.RowSource = "nrng_Jobs"
</code>
In a module sub I want to have code that assigns the RowSource value to a named ranged prior to
showing the UserForm that contains the ComboBox where the RowSource is to be filled.
(This will fill the ComboBox with named range data.)
The following code gets an error as invalid. Is RowSource assignment by code not allowed for Comobox, or do I just need to tweak my code?
Thanks for any tips. TTom
<code>
ActiveWorkbook.Names.Add Name:="nrng_Jobs", RefersTo:="=Sheet2!$T$1:$T$" & Range("T6000").End(xlUp).Row
ufJobSelect.cbxJobSelect.RowSource = "nrng_Jobs"
</code>