Name
control
.List([Row
, Column
]) [= setting
]
Synopsis
Sets or returns the value of one item within the list or all items in the list.
Argument |
Settings |
|
The row of an item in the list |
|
The column of an item in the list |
Omit Row
and Column
to get or set the array containing all items in the list. For example, the following code loads an array of strings into the control:
Private Sub UserForm_Initialize( ) ComboBox1.List = Split("This, that, other", ",") ' Select the first item. ComboBox1.ListIndex = 0 End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.