Name
control
.Column([Column
][, Row
])
Synopsis
Sets or returns the value of a list column or an item within a column of the list.
Argument |
Settings |
---|---|
|
The index of the column in the list |
|
The index of the item within the column |
Use Column
to get a value from items in a row of a multicolumn combo box. The BoundColumn
topic shows how to create a combo box with three columns. You can get the value from any of those columns using the Column
method as shown here:
Private Sub ComboBox1_Change( ) If ComboBox1.Value <> "" Then _ MsgBox "Second column is: " & ComboBox1.Column(1, ComboBox1.ListIndex) End Sub
Tip
Column
and Row
indexes start at 0, so 1 is the second column.
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.