0

I read strings from a column in a workbook and used them to populate combo boxes in a userform, but I can't find a way to return the user-inputted value.

When I try to assign the value to a variable, I get a '424' error, and if I try to use the variable in a function, Excel crashes.

This gives a 424 error:

Private Sub findColumns_button_Click()
    Dim index As Integer, hyperlink_A As String, des As String
    des = ResultCombo_A.Value
End Sub

And something like this crashes it:

Private Sub findColumns_button_Click()
    Dim index As Integer, hyperlink_A As String, des As String
    index = findIndex(ResultCombo_A.Value)
End Sub
Ben
  • 47
  • 6
  • 1
    Depending on how you built the combo box, you might be referencing the OLE object incorrectly. It might be `des = ResultCombo_A.Object.Value`. See [this answer](https://stackoverflow.com/questions/44083621/vba-how-to-reference-combobox-object) for a detailed breakdown. – SmrtGrunt Jun 04 '19 at 17:44
  • Is this on a sheet or a userform? If this is on a sheet: Is this a Forms button or an ActiveX?. Like SmrtGrunt said, depending on the button type, or if this is on a Sheet or a UserForm, the way to call the combobox value will be different. – Ricardo A Jun 04 '19 at 22:25

0 Answers0