Excel VBA UserForm Combobox Learn how to get selected item.
The source code used in this video:
Private Sub cbOK_Click()
If cbDays.ListIndex = -1 Then
MsgBox "Nothing selected"
Else
MsgBox "Selected item: " & cbDays.Value
End If
End Sub
Private Sub UserForm_Initialize()
With cbDays
.AddItem "Monday"
.AddItem "Tuesday"
.AddItem "Wednesday"
End With
End Sub
Watch video Excel VBA UserForm Combobox Get Selected Item online without registration, duration hours minute second in high quality. This video was added by user InAnOffice 17 February 2015, don't forget to share it with your friends and acquaintances, it has been viewed on our site 26,398 once and liked it 82 people.