I have a DialogSheet (not a userform, this is just the way the sheet was set up nearly 20 years ago) that I have added a combobox to. I am trying to save the value of that combobox to a cell on my sheet but it I get the following error:
Run-time error '438' : Object doesn't support this property or method.
Here is the sub that causes the error:
Sub ModelNameSelection_Change()
Dim ModelName As String
ModelName = DialogSheets("setup").ModelNameSelection.Value
Worksheets("sheet1").Unprotect
Worksheets("sheet1").Cells(1, 10).Value = ModelName
Worksheets("sheet1").Protect
End Sub
The dialog sheet the combobox is on is called "setup" and the combobox has the name ModelNameSelection.
Is there a specific way to refer to the value in the drop down box?
DialogSheets("setup")
apparently doesn't have aModelNameSelection
public member. What type of control is the combobox? Is it ActiveX or "Forms Controls"? - Mathieu Guindon