Sub FindCbox()
Dim obj As Object
For Each obj In ActiveSheet.OLEObjects
If TypeOf obj.Object Is MSForms.ComboBox Then
MsgBox obj.Name
End If
Next
End Sub
Sub DelCbox()
Dim obj As Object
For Each obj In ActiveSheet.OLEObjects
If TypeOf obj.Object Is MSForms.ComboBox Then
If LCase(obj.Name) = "combobox38" Then
obj.Delete
End If
End If
Next
End Sub
Try running the first code below and if it finds the combobox then run the second code to delete it.
Code:Sub FindCbox() Dim obj As Object For Each obj In ActiveSheet.OLEObjects If TypeOf obj.Object Is MSForms.ComboBox Then MsgBox obj.Name End If Next End Sub
Code:Sub DelCbox() Dim obj As Object For Each obj In ActiveSheet.OLEObjects If TypeOf obj.Object Is MSForms.ComboBox Then If LCase(obj.Name) = "combobox38" Then obj.Delete End If End If Next End Sub
You put the code in a regular module. Press ALT-F11 and paste the code in the white space that appears.
Click in front of the word Sub in the the first code then then click Run - Run Sub/UserForm.
Go back to the VBE editor click tools, references and see if any references are marked as missing and make sure that Micosoft forms 2.0 object library and OLE automation are checked (and your Excel and Office library as well while you are there).
And check that you have actually enabled ActiveX controls.
What would it say if there was a reference missing?