Freigeben über


"Object library invalid or contains references to object definitions that could not be found" or "Element not found"

After installing security advisory 960715 and opening a workbook with one of Visual Basic 6 ActiveX controls embedded in the workbook you receive an error:

This blog is inactive.
New blog: EricWhite.com/blog

Blog TOC“Object library invalid or contains references to object definitions that could not be found” or “Element not found.”

For more information, see this post on the Visual Studio Office Developer Team’s blog. We want to get this message out to the most people possible.

Comments

  • Anonymous
    June 10, 2010
    The comment has been removed

  • Anonymous
    June 11, 2010
    Denis, Sounds like an Add-in is causing the issue. I would troubleshoot which one by clicking the File tab, clicking Options, clicking Add-Ins, selecting COM Add-Ins under Manage, and then clicking Go...  Uncheck all the Add-ins that load on Startup and then click OK. Close Excel 2010. Then, go back into the same COM Add-Ins dialog and check one Add-in and then click OK. Restart Excel. If you get the error message, then it's that Add-In that's causing the problem.

  • Anonymous
    December 26, 2010

  1. Open the command prompt.
  2. Navigate Document and Settings
  3. C:Documents and Settings>del /S /A:H /A:-H *.EXD (and press enter key)
  • Anonymous
    May 13, 2011
    Abbas Mohamed - thank you the excellent advise on solving the above problem. I shall save this to my support information file. Regards Steve

  • Anonymous
    May 15, 2011
    Hi Abbas, This didn't solve my issue.I'm still receiving this error!

  • Anonymous
    May 17, 2011
    Abbas...solved my problem with Execl 2010 on Windows XP Professional...thank you.

  • Anonymous
    July 13, 2011
    Thanks Abbas for the perfect solution.

  • Anonymous
    July 21, 2011
    Hello all The solution proposed by Abbas Mohamed

  1. Open the command prompt.
  2. Navigate Document and Settings
  3. C:Documents and Settings>del /S /A:H /A:-H *.EXD (and press enter key) Does not worked for me. Each time the files are deleted. Each they are showing again when I try to open my Excel file. Any other idea ? Thanks
  • Anonymous
    September 21, 2011
    Excellent Abbas Mohamed.. thanks for your help.... now itz not error out...

  • Anonymous
    September 23, 2011
    Thanks Abbas. The problem is resovled.

  • Anonymous
    November 17, 2011
    There is no c:documents and settings for windows 7...

  • Anonymous
    November 18, 2011
    Thanks Stephen D. Oliver I had this error with Excel and it WAS the Add In I had installed, I could not repair it so i had to remove the add-in and problem has been resolved

  • Anonymous
    December 01, 2011
    One way to work around this is to explicitly add the reference to the controls:

  1. Open the .xls file in question and click OK after getting the error mentioned above.
  2. Open the Visual Basic Editor (Alt+F11)
  3. Open (if they are not already open) one of the modules or code behind forms
  4. Click on Tools / References...
  5. In the pop-up window click on Browse...
  6. Navigate to [Your Windows Directory]System32 (it may open by default)
  7. Type MSCOMCTL.OCX (you'll see it in the auto-select options before you finish typing)
  8. Click Open and the reference will appear as Microsoft Windows Common Controls 6.0 (SP6)
  9. Click on DebugCompile VBAProject to verify that the problem is solved
  10. Save the file.
  • Anonymous
    December 07, 2011
  1. Open the command prompt.
  2. Navigate Document and Settings
  3. C:Documents and Settings>del /S /A:H /A:-H *.EXD (and press enter key) This worked for me. Thanks. May I know what exactly you are trying to do with the command.
  • Anonymous
    January 24, 2012
    the solution: One way to work around this is to explicitly add the reference to the controls:
  1. Open the .xls file in question and click OK after getting the error mentioned above.
  2. Open the Visual Basic Editor (Alt+F11)
  3. Open (if they are not already open) one of the modules or code behind forms
  4. Click on Tools / References...
  5. In the pop-up window click on Browse...
  6. Navigate to [Your Windows Directory]System32 (it may open by default)
  7. Type MSCOMCTL.OCX (you'll see it in the auto-select options before you finish typing)
  8. Click Open and the reference will appear as Microsoft Windows Common Controls 6.0 (SP6)
  9. Click on DebugCompile VBAProject to verify that the problem is solved
  10. Save the file. Worked for me
  • Anonymous
    February 09, 2012
    Thanks Fermon, it worked fine. The issue had started since i uninstalled Microsoft Project Plan 2011 and i have Office 2003

  • Anonymous
    February 22, 2012
    Hi to all, I just try to find all the *.EXD from the all drive C searching, and move them in other location like C:Temp or C:Documents. With his modification the problem was resolved. I hope this could help to someone. Regards!

  • Anonymous
    April 12, 2012
    The comment has been removed

  • Anonymous
    April 15, 2012
    Thank you Nathalie, your solution worked for me!

  • Anonymous
    April 17, 2012
    When using Windows 7, use a file manager like Windows Explorer to go into the user specific directory "%AppData%RoamingMicrosoftForms" and delete the EXD-files "RefEdit.exd" and "MSComctlLib.exd" I am focus on window based testing. If you are interested, please contact me z_yu_t@hotmail.com

  • Anonymous
    April 19, 2012

  1. Open the command prompt.
  2. Navigate Document and Settings
  3. C:Documents and Settings>del /S /A:H /A:-H *.EXD (and press enter key) This worked for me, Thanks!
  • Anonymous
    April 19, 2012
    you are a STAR Abbas Mohamed..it works like a charm

  • Anonymous
    April 19, 2012
    Linus:  Perfect!  Worked like a charm for Win 7. Thank you.

  • Anonymous
    April 22, 2012
    Linus, you are my hero. So many solutions that worked in the past have not been working this week. Yours finally resolved the issue. Much appreciated!

  • Anonymous
    April 23, 2012
    Thanks to Linus! Windows 7 users, his solution worked for me: When using Windows 7, use a file manager like Windows Explorer to go into the user specific directory "%AppData%RoamingMicrosoftForms" and delete the EXD-files "RefEdit.exd" and "MSComctlLib.exd"

  • Anonymous
    April 26, 2012
    any way to script this fix and push it to thousands of pcs? or a hotfix?

  • Anonymous
    April 27, 2012

  1. Open the .xls file in question and click OK after getting the error mentioned above.
  2. Open the Visual Basic Editor (Alt+F11)
  3. Open (if they are not already open) one of the modules or code behind forms
  4. Click on Tools / References...
  5. In the pop-up window click on Browse...
  6. Navigate to [Your Windows Directory]System32 (it may open by default)
  7. Type MSCOMCTL.OCX (you'll see it in the auto-select options before you finish typing)
  8. Click Open and the reference will appear as Microsoft Windows Common Controls 6.0 (SP6)
  9. Click on DebugCompile VBAProject to verify that the problem is solved
  10. Save the file. This also worked for me. Thanks.
  • Anonymous
    April 29, 2012
    Thanks Abbas for your help .. it worked like magic

  • Anonymous
    April 29, 2012
    For windows 7, This worked for me like a charm: Linus 18 Apr 2012 3:08 AM When using Windows 7, use a file manager like Windows Explorer to go into the user specific directory "%AppData%RoamingMicrosoftForms" and delete the EXD-files "RefEdit.exd" and "MSComctlLib.exd"

  • Anonymous
    April 30, 2012
    Excellent Abbas - Works for me. I was in the middle of an important Oracle BI Publisher deliverable which works over Microsoft Word & I was unable to open the tags. Thanks a ton :)

  • Anonymous
    May 01, 2012
    Thanks Abbas. That solved my problem too

  • Anonymous
    May 02, 2012
    Abbas Mohamed solved my issue. Thanks

  • Anonymous
    May 03, 2012
    the solution: One way to work around this is to explicitly add the reference to the controls:

  1. Open the .xls file in question and click OK after getting the error mentioned above.
  2. Open the Visual Basic Editor (Alt+F11)
  3. Open (if they are not already open) one of the modules or code behind forms
  4. Click on Tools / References...
  5. In the pop-up window click on Browse...
  6. Navigate to [Your Windows Directory]System32 (it may open by default)
  7. Type MSCOMCTL.OCX (you'll see it in the auto-select options before you finish typing)
  8. Click Open and the reference will appear as Microsoft Windows Common Controls 6.0 (SP6)
  9. Click on DebugCompile VBAProject to verify that the problem is solved
  10. Save the file. Worked for me
  • Anonymous
    May 10, 2012
    Thanks Abbas, for the perfect solution. It works for Excel 2007 on Windows XP professional.

  • Anonymous
    May 13, 2012
    Thanks to Abbas, The solution worked for me too.

  • Anonymous
    May 13, 2012
    Thanks Abbas, your solution worked perfectly for me. I knew I had to find and delete the exd files (as I had to solve a similar problem in 2009) but was finding it difficult to track them all down. Your solution worked perfectly. Thanks a million times.

  • Anonymous
    May 16, 2012
    Thank you Abbas, that resolved my issue as well. Excel 2007 on Windows XP.

  • Anonymous
    May 17, 2012
    Its working fine, realy helpfull command.

  • Anonymous
    May 22, 2012
    the solution: One way to work around this is to explicitly add the reference to the controls:

  1. Open the .xls file in question and click OK after getting the error mentioned above.
  2. Open the Visual Basic Editor (Alt+F11)
  3. Open (if they are not already open) one of the modules or code behind forms
  4. Click on Tools / References...
  5. In the pop-up window click on Browse...
  6. Navigate to [Your Windows Directory]System32 (it may open by default)
  7. Type MSCOMCTL.OCX (you'll see it in the auto-select options before you finish typing)
  8. Click Open and the reference will appear as Microsoft Windows Common Controls 6.0 (SP6)
  9. Click on DebugCompile VBAProject to verify that the problem is solved
  10. Save the file. Worked for me
  • Anonymous
    May 24, 2012
    The solution: When using Windows 7, use a file manager like Windows Explorer to go into the user specific directory "%AppData%RoamingMicrosoftForms" and delete the EXD-files "RefEdit.exd" and "MSComctlLib.exd" Worked for me, Thanks!

  • Anonymous
    May 29, 2012
    Abbas Mohamed- thank you it worked fine.

  • Anonymous
    May 30, 2012
    The solution below worked from me . Thank you Fermon .

  1. Open the .xls file in question and click OK after getting the error mentioned above.
  2. Open the Visual Basic Editor (Alt+F11)
  3. Open (if they are not already open) one of the modules or code behind forms
  4. Click on Tools / References...
  5. In the pop-up window click on Browse...
  6. Navigate to [Your Windows Directory]System32 (it may open by default)
  7. Type MSCOMCTL.OCX (you'll see it in the auto-select options before you finish typing)
  8. Click Open and the reference will appear as Microsoft Windows Common Controls 6.0 (SP6)
  9. Click on DebugCompile VBAProject to verify that the problem is solved
  10. Save the file.
  • Anonymous
    June 05, 2012
    Worked Abbas steps for me in Windows XP with Office 2007 Thanks Abbas

  • Anonymous
    June 13, 2012
    Thanks Fermon... worked... Excellent...

  • Anonymous
    June 21, 2012
    Thanks Abbas. That solved my problem too

  • Anonymous
    July 09, 2012
    Mentioned Command worked for me. Thanks.

  • Anonymous
    July 12, 2012
    The comment has been removed

  • Anonymous
    August 21, 2012
    in window 7 try to run the same under C:users instead

  • Anonymous
    August 28, 2012
    Fermon, many thanks! your solution worked for me!

  1. Open the .xls file in question and click OK after getting the error mentioned above.
  2. Open the Visual Basic Editor (Alt+F11)
  3. Open (if they are not already open) one of the modules or code behind forms
  4. Click on Tools / References...
  5. In the pop-up window click on Browse...
  6. Navigate to [Your Windows Directory]System32 (it may open by default)
  7. Type MSCOMCTL.OCX (you'll see it in the auto-select options before you finish typing)
  8. Click Open and the reference will appear as Microsoft Windows Common Controls 6.0 (SP6)
  9. Click on DebugCompile VBAProject to verify that the problem is solved
  10. Save the file.
  • Anonymous
    September 13, 2012
    The comment has been removed

  • Anonymous
    December 04, 2012
    Thanks Abbas. It worked. using win xp & office 2010.

  • Anonymous
    February 15, 2013
    Thanks Abbas. That solved my problem too

  • Anonymous
    May 21, 2013
    Saurabh comment works perfectly in window 8, ms office 2010

  • Anonymous
    June 18, 2013
    fixed issue by replacing MSCOMCTL.OCX file on System32 folder from a working pc

  • Anonymous
    October 23, 2013
    unregister and then register "MSCOMCTL.OCX" Path: 32-Bit OS C:WindowsSystem32MSCOMCTL.OCX 64-Bit OS C:WindowsSySWOW64MSCOMCTL.OCX

  • Anonymous
    October 27, 2013
    Follow this link.Problem solved. support.microsoft.com/.../2703186

  • Anonymous
    January 17, 2015
    The comment has been removed

  • Anonymous
    February 17, 2015
    I facing the problem even after I add the MSCOMCTL.OCX in reference.

  • Anonymous
    April 22, 2015
    I solved it by uploading fresh fm20.dll to the client