+ Reply to Thread
Results 1 to 6 of 6

Can't exit design mode because control can't be created.

  1. #1
    Registered User
    Join Date
    12-10-2010
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    2

    Can't exit design mode because control can't be created.

    Opening a workbook from a template results in it opening in Design Mode. Right clicking to Open the Template, the Design Mode is not on.
    This particular Excel Template was originally created in excel 2003 with a calendar control.
    When I upgraded to Excel 2007, the calendar control no longer functioned, so I used the Date Picker. Date Picker worked for many months. Now when double clicking the template the resulting excel workbook displays the message, Can't exit design mode because control 'DatePicker1' can't be created. Choose OK, and now you can click exit Design Mode and enable Macros/ActiveX.
    Saving as .xlsm from the .xltm creates a workbook that opens normally (without being in Design Mode).
    Saving the .xlsm as .xltm makes the resulting excel Template open in Design Mode.
    Saved as .xlsx does not open in Design Mode, ActiveX works, macros aren't there.
    Saved as .xls from .xltm does not open in Design Mode.
    Saved as .xls from .xlsm does not open in Design Mode.
    Saved as .xlt from .xls opens in Design Mode.
    Saved as .xlt from .xltm opens in Design Mode.
    I have tried this over and over with various save combinations with the results being that double clicking to open a template results in the workbook opening in Design Mode.
    How can I turn it off and keep it off?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Can't exit design mode because control can't be created.

    Don't use the ActiveX control, see the alternatives here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-10-2010
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Can't exit design mode because control can't be created.

    Sorry, my company's security won't allow me to view your site; your link is blocked. McAfee Security Rating: Red
    I guess I'm SOL.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Can't exit design mode because control can't be created.

    Hi DocDeb

    There's some code in this link that builds a Calendar form and demonstrates it's use in a UserForm http://www.excelforum.com/excel-prog...aturely-2.html

    That same code is in the attached and demonstrates it's use in a Worksheet. The Calendar is built with and used by code...it's not an ActiveX Control.

    Perhaps you can adapt the code for your use.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Can't exit design mode because control can't be created.

    Can you post the template (without data) so we can check if it's a file or machine issue? Sounds a little like a Trust Center problem. Do you have SP2 and subsequent patches in place?
    Remember what the dormouse said
    Feed your head

  6. #6
    Registered User
    Join Date
    10-24-2012
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Can't exit design mode because control can't be created.

    Well, I'm am happy that I can finally help out instead of just asking questions. I encountered this same problem this morning while working on a workbook that keeps track of reporting numbers for a $2million grant that I am in charge of. I freaked out when I couldn't get out of design mode and get the stupid thing to allow me to click the buttons that I had put in. I'm probably late to help the OP, but hopefully someone can benefits from this. Anyway, I digress... Here is what I have found:

    When I was first creating the Workbook I created several ActiveX "Testing" buttons to try out the various bits of coding. Over the course of finalizing the project, I deleted the "Testing" buttons to replace them for fully/multiple functioning ActiveX buttons. Viola! They worked! ...... But only while it was on my PC. It all went to crap when I moved the file to a network drive where it would be perminently housed.

    So I go back to use the Workbook and it says "Can't exit design mode becase Control 'Command Button 1' cannot be created" (or something like that). I couldn't get out of design mode to save my life (and my job!) to use all of the fancy buttons I had put in. I took a breath, a smoke break, and then went digging.

    Turns out, on some of the sheets (which have between 2-5 buttons) I had Command Button 1 as a "Tester" and Command Button 2 as the functional one. When I deleted Command Button 1, saved it, and moved it... well, Excel couldn't wrap its head around that. When the Workbook tried to reopen in its new home, it RENAMED Command Button #2 as #1 in the name box beside the formula bar. In the Command Button properties menu however, it remained Command Button 2. After looking at all of the sheets, I noticed that Excel was playing "name games" with several of my buttons.

    I tried several ways to do this, but only one way worked:
    DID NOT WORK:
    1. Changing the Command Button 1 name (beside the formula bar) to Command Button 2. It just wouldn't accept the name change. It kept coing back to #1
    2. Changing the Command Button 2 name (in the properties menu) to Command Button 1. Then my VBA freaked out and said it was a redundant name and wouldn't allow it.

    WHAT DID WORK:
    I changed each and every button on each and every sheet to a unique name (no more letting Excel number them for me!). Of course, I had to go back and change the CommandButton#_Click() to NewButtonName_Click(). That took a while, and at first it appeared that it did not work. So I decided to save it, close it, and go for another smoke break. When I came back and reopened it, it worked. Apparently Excel needed to have a fresh start on the Workbook to reset the error.

    Lessons Learned:
    To prevent this error ALWAYS create a UNIQUE name for each object. Not just a caption... but the actual name itself. NEVER LET EXCEL DO IT FOR YOU!

    I hope this helps someone in the future.

    Regards. -Adam

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1