Closed Thread
Results 1 to 6 of 6

Excel ActiveX ControlBox Cannot Insert Object error

  1. #1
    Registered User
    Join Date
    01-14-2006
    Posts
    12

    Excel ActiveX ControlBox Cannot Insert Object error

    Hi,

    Every time I try to insert an ActiveX control (eg command button) from the control toolbox onto an Excel worksheet, I get the error "Cannot Insert Object". I've spent two hours searching the internet for a solution and nothing seems to help. I thought I may need to register an ocx file, but if so, I don't know what it's called. I tried registering the fm20.dll file, but I still get the error after doing that. Does anyone have any suggestions? This problem also prevents me from running macros in existing workbooks that have ActiveX controls, returning "unexpected error (32811)".

    Tim

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

    Re: Excel ActiveX ControlBox Cannot Insert Object error

    What version of Excel are you using?

    Is the sheet/workbook protected?
    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
    01-14-2006
    Posts
    12

    Re: Excel ActiveX ControlBox Cannot Insert Object error

    Hi Roy,

    The problem is occurring in Excel 97. Neither the workbook nor the worksheet are protected - the problem even happens in new books.

    I had it working in Excel 97 under Windows Vista for a few months with no problems, then once I upgraded the operating system to Windows 7 the problem started. I also have Office 2007, but need the 97 version for backwards compatibility - where I work there are a variety of Office versions used.

    Cheers,

    Tim

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,069

    Re: Excel ActiveX ControlBox Cannot Insert Object error

    Hello exceltim,

    Try clearing out all the files and folders in the user TEMP directory. When a control is created in VBA a folder for Excel and VBE are created (Excel 8.0 and VBE). These folders hold information about the control in files with EXD extensions. These files are used are the initial creation of the control to speed loading. Although the EXD format is the same, the file contents vary depending on the Excel version being run. Problem is, these files are not deleted when you close Excel. If a file exists that contains a old control matching a newer version then the error "Cannot Insert Object" error is thrown. You can safely delete these files and folders in the TEMP directory without harm. You may also want to check your VBA References for any missing libraries.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Registered User
    Join Date
    01-14-2006
    Posts
    12

    Re: Excel ActiveX ControlBox Cannot Insert Object error

    Thanks very much Leith.

    Actually, the problem seemed to fix itself somehow - when I turned my computer on today I was able to place activex controls on worksheets in new and existing workbooks with no problem. Perhaps it had something to do with re-registering the fm20.dll, requiring the computer to be restarted? The only problem now is that error message "unexpected error 32811" occurring in a particular workbook - the problem part of the code seemed to be the sheet reference. That is, my code said Sheet1.Activate, but the code wouldn't work until I changed it to Worksheets("Sheet1").Activate. Not sure why this is the case considering Sheet1 is the sheet code name and was working perfectly before, but at least I've been able to get it working a different way.

    Tim

  6. #6
    Registered User
    Join Date
    10-16-2013
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Excel ActiveX ControlBox Cannot Insert Object error

    See:

    http://support.microsoft.com/kb/3025036

    Microsoft "Fix it" worked for me!

Closed Thread

Thread Information

Users Browsing this Thread

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

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