design mode error

acapro

New Member
Joined
Jan 11, 2014
Messages
34
Hi I have a box that continually pops up "can't exit design mode because control 'combobox38' can not be created" can some help me find combo box 38 so I can stop this error continuing to pop up

Thanks in advance
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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
 
Last edited:
Upvote 0
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

Mark Mark,

I am a new to the world of excel where do I put the code
 
Upvote 0
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.
 
Upvote 0
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.

Thanks Mark but it came up with a box saying " runtime error 57121. application defined or object defined error"
 
Upvote 0
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.
 
Last edited:
Upvote 0
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?

other than that 2.0 and OLE were checked

I set up about 30 boxes yesterday without any problems

I will send you a private message
 
Upvote 0
What would it say if there was a reference missing?

Missing.

I am assuming that you are using ActiveX controls and not forms controls.
See my reply to your personal message about how to create a link to your file.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,752
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top