ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   combobox rowsource as code (https://www.excelbanter.com/excel-programming/339954-combobox-rowsource-code.html)

JasonSelf[_20_]

combobox rowsource as code
 

How do I specify a rowsource in VBA

Combobox1.rowsource = range (testrange)

where testrange is a named range in excel. This is so I can
dynamically fill in some comboboxes.

Thanks,
Jason


--
JasonSelf
------------------------------------------------------------------------
JasonSelf's Profile: http://www.excelforum.com/member.php...fo&userid=5330
View this thread: http://www.excelforum.com/showthread...hreadid=467237


Dave Peterson

combobox rowsource as code
 
I like:

Combobox1.rowsource = range(testrange).address(external:=true)



JasonSelf wrote:

How do I specify a rowsource in VBA

Combobox1.rowsource = range (testrange)

where testrange is a named range in excel. This is so I can
dynamically fill in some comboboxes.

Thanks,
Jason

--
JasonSelf
------------------------------------------------------------------------
JasonSelf's Profile: http://www.excelforum.com/member.php...fo&userid=5330
View this thread: http://www.excelforum.com/showthread...hreadid=467237


--

Dave Peterson


All times are GMT +1. The time now is 06:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com