Home » excel » combobox – Excel VBA Combo Box returning index not value

combobox – Excel VBA Combo Box returning index not value

Posted by: admin April 23, 2020 Leave a comment

Questions:

I’ve got a combo box set up in Excel 2007 which gathers its list items from another sheet. When I try to access the value of the selected item through a macro all I am returned is the index value and not the actual value.

DateDropDown = Sheets("Input Form").Shapes("APPDateDropDown").ControlFormat.Value

The value in the combo box is listed as “Jan-12” but when I run the code above DateDropDown is returned as 37 (the index of the item).

How do I get it to return the value “Jan-12”?

How to&Answers:
With Sheets("Input Form").Shapes("APPDateDropDown")
    DateDropDown = .ControlFormat.List(.ControlFormat.ListIndex)
End With