Can't exit Design Mode issue

nuc_n_futs

Board Regular
Joined
Dec 10, 2008
Messages
78
I am having an issue with Visual Basic, I keep getting an error message, "Can't exit design mode because Control 'Command Button11' cannot be created' when I try to exit Design Mode.

when viewing the code, I click on the drop down menu where all the command buttons are stored in the Visual basic Editor and there is a CommandButton11 (as well as another 40 Command Buttons) that for the life of me, I cannot find them anywhere on my spreadsheet.

Is there any way I can delete these CommandButtons out of the drop down menu? If so, how?

If not, is there another work around so I can finally Exit Design Mode, such as putting in ficticious code that will do absolutely nothing but remove the error.

I really don't want to have to create this sheet over again.

Thank you,

Ron
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Ron

Do you create these command buttons, or know how they were created?

You might be able to goto Edit>Goto...Special... and select Objects then press Delete.

Now that's not going to work if there are objects you want to keep or objects that won't work with it.

PS Sorry, but I've got to ask why you have all these buttons anyway.:)
 
Upvote 0
A very quick search on Google revealed this: http://support.microsoft.com/kb/166784

Not sure it's applicable but...

Alternatively you could select all worksheets then copy them to a new workbook. Export your code and then import it in the new (or copy and paste or even drag it into the new book). That might get rid of the phantom control. But I'm just guessing....
 
Upvote 0
Hi Norie,

I'm sorry, I should have been more clear, but I am sure it was the utter frsutration of the error that kept me from providing more detail.

I am working in Excel 2007, I created all the buttons using the ActiveX Controls.

I have approx. 40 buttons, representing 13 manufacturing departments, designed to be used as a shared workbook for each department to provide hours per part, tooling required, etc... The first set of buttons represents a quick way to get to their department since there are 500 lines in a worksheet (rather than have them scroll down), the 2nd set, a "Hide" / "Unhide" button so I can hide departments that will not be needed (maybe redundant if you can hit the quick button above), and the 3rd set is for printing the individual department page for their records.

I am not sure where the extra command buttons came from, they are not visible anywhere in the workbook.

If there is a better solution to what I am doing, I am all ears (I guess eyes, since I will be reading it :))

Since I am in 2007, there is no Edit - Goto special.

Ron
 
Upvote 0
See if it will let you save the sheet, then exit excel completely, open the sheet again and see if the phantoms are still there.
 
Upvote 0
Yep, still in the drop down box in the VBA Editor and still getting the error message.

I guess I will need to copy everything in a new workbook and re-create the buttons.
 
Upvote 0
Note that I was getting this same error (Run-time error 57121) as well. I finally determined that it was due to a BAD ActiveX control on one of my worksheets - this was the standard button command control that is included with Excel 2010. In the VB Editor on the worksheet with the bad ActiveX, there were at least 50 other controls listed in the dropdown box - not sure how they got there as I only was using and could see 2 command buttons on the worksheet. And of course the other ~48 were no where to be found on the sheet. Back on the sheet, 1 of the controls had valid properties and the other control had a blank property page. I tried deleting the ActiveX control and the program would crash. I tried deleting the worksheet and the program would crash.
After hours of work, the fix, was to disable ALL ActiveX controls from the Options page under the Trust Center tab. Then exit the Excel file, reopen it and then and only then did it allow me to delete the control and ultimately the worksheet.

I hope this helps others with the bug issue, I can only believe that the file/ActiveX got corrupted from Excel crashes during development.

I had to take the time and post a solution on this great website as it has helped me out greatly over the years.
 
Upvote 0
I started getting this same message, after making some code adjustments. Now this message comes up when I OPEN the file. The message includes the name of a command button that is supposed to show up when opening the workbook. I don't know why it says something about design mode, when I am just trying to open the workbook, not go into or out of design mode. Does anyone know why?
 
Upvote 0
I have run across this problem today. The msg comes up when the workbook is opened. and it involves the "Can't exit design mode". I am not sure if this matters but I made changes to VBA on a different machine then I normally use. The workbook opens up fine on the machine I made the changes on but if I move it to another one it crashes. (tried it on 2 other machines)

Could there be a different activex involved or some other parameter that is not installed? Perhaps the one I made the changes with has newer components?

To try to prove this I will go back to the original file an make the changes on a different machine to see if the error is duplicated.

Any input would be welcome.
 
Upvote 0
Did use original working workbook, put it on a different computer and made the same changes. The workbook now opens error free, just like a workbook should;)

Still believe that the error could be introduce by using a different activex or some other difference in the other machine. Like to know, but I'm over the rough patch since the workbook works.
 
Upvote 0

Forum statistics

Threads
1,215,753
Messages
6,126,677
Members
449,327
Latest member
John4520

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