April 2006
Beginner
1114 pages
98h 16m
English
commandbarcombobox.List(Index)
Returns one or all of the items in the list. You can get the selected item by using the Text property or by using this method in combination with the ListIndex property as shown here:
Sub ShowSelection( )
Dim cbo As CommandBarComboBox
, str As String
' Get the control
Set cbo = CommandBars("Worksheet Menu Bar").FindControl _
(msoControlDropdown, , "cboSelectText", , True)
' Get the selection.
str = cbo.list(cbo.ListIndex)
' Display selection.
MsgBox "You selected: " & str
End SubRead now
Unlock full access