ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Define Range for Combo Box (https://www.excelbanter.com/excel-programming/289260-define-range-combo-box.html)

gregork

Define Range for Combo Box
 
Is it possible to define a cell range for a combo box list on a user form.
If yes then how would you write the code ? I know I could list with .AddItem
"" but I have a possible list of 200 entries so I'm looking for a shortcut.

regards
GregK



Lawlera

Define Range for Combo Box
 
Firstly, name your array

ComboBox1.List = Range("a").Value

e.g. assumes "a" is the named array


Bob Phillips[_6_]

Define Range for Combo Box
 
Greg,

Set the RowSource property to the range.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gregork" wrote in message
...
Is it possible to define a cell range for a combo box list on a user form.
If yes then how would you write the code ? I know I could list with

..AddItem
"" but I have a possible list of 200 entries so I'm looking for a

shortcut.

regards
GregK






All times are GMT +1. The time now is 12:02 PM.

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