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
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,872
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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:

acapro

New Member
Joined
Jan 11, 2014
Messages
34
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
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,872
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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.
 

acapro

New Member
Joined
Jan 11, 2014
Messages
34

ADVERTISEMENT

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"
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,872
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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:

acapro

New Member
Joined
Jan 11, 2014
Messages
34
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
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,872
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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:

Watch MrExcel Video

Forum statistics

Threads
1,122,964
Messages
5,599,071
Members
414,281
Latest member
Engjamal2021

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
Top