Populate an Excel ComboBox

From CodeCodex

Implementations[edit]

VB / VBA[edit]

'This sub fills the ComboBox passed as ''object'' with the options ''A'', ''B'', ''C'', ''D''.
Private Sub FillComboBox(object)
  With object
   .Clear
   .Width = 35
   .AddItem "A"
   .AddItem "B"
   .AddItem "C"
   .AddItem "D"
   .ListWidth = 25
   .BoundColumn = 0
  End With
End Sub