none
After December 2014 update, Compile Error - calling Excel Objects > Sub "Object library invalid or contains references to object definitions that could not be found" RRS feed

  • Question

    • When try to call Sub in Excel Objects > SheetXX after the original xlsm is modified and saved by another user in diff machine, getting an error below and seems Excel cannot identify any subs exists in Sheet.

    Compile error:
    Object library invalid or contains references to object definitions that could not be found

    • Note: it seems that this problem has been occurring After December 2014 update and still exists even after applying the fix: http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2014/12/11/forms-controls-stop-working-after-december-2014-updates-.aspx)



    • Edited by kwlee324 Tuesday, January 6, 2015 3:48 PM
    Tuesday, January 6, 2015 3:20 PM

Answers

  • Found very *COMPLICATED* temp workaround to repair the impacted file until we have better solution or permanent fix release.
    this solution seems working only in Excel 2010 (not working in 2007/below).

    1. Open the impacted file in Excel 2010
    2. VBA Project > Tools > Reference
       Now, you should see a new reference called "VBAProject" -- detached from the workbook
       1) Check "VBAProject", click "OK", and Save the file
    3. Close All MS Office Applications
    4. Rerun MS FixIt http://go.microsoft.com/?linkid=9875022 to delete all .exd files again or
      do it manually: http://support.microsoft.com/kb/3025036/EN-US
    5. Open, confirm and Save in Excel 2010
    6. Done, Repaired! -- now the xlsm file can be run in both 2007 and 2010 w/o 'Invalid Object library' error.






    Wednesday, January 7, 2015 9:08 PM
  • Hi Kwlee324,

    Thanks for sharing the workaround with us. It would be very helpful for others who have the same issue.

    Also I found a two useful links about the error message "Object library invalid or contains references to object definitions that could not be found":
    https://support.microsoft.com/kb/2703186

    http://blogs.msdn.com/b/vsod/archive/2009/06/05/visual-basic-6-controls-stop-working-after-security-advisory-960715.aspx

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, January 9, 2015 6:08 AM
    Moderator

All replies

  • Hi Kwlee324,

    Thanks for posting in MSDN forum.

    Did the solution provied by this blog fix this issue? If not, would you mind shareing with us the detail information to reproduce this issue?

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 7, 2015 6:10 AM
    Moderator
  • Nope - the blog solution doesn't fix this problem although it was helpful to resolve other ActiveX and object security issues. More details:

    1. The problem occures after the macro-enabled workbook is being modified and saved by another user
    2. Individual Sheet based Excel Objects > Subs become unidentifiable and causing the following compile and make subs/functions unable to run: 

      Compile error:
      Object library invalid or contains references to object definitions that could not be found


    • Edited by kwlee324 Wednesday, January 7, 2015 1:48 PM
    Wednesday, January 7, 2015 1:47 PM
  • Found very *COMPLICATED* temp workaround to repair the impacted file until we have better solution or permanent fix release.
    this solution seems working only in Excel 2010 (not working in 2007/below).

    1. Open the impacted file in Excel 2010
    2. VBA Project > Tools > Reference
       Now, you should see a new reference called "VBAProject" -- detached from the workbook
       1) Check "VBAProject", click "OK", and Save the file
    3. Close All MS Office Applications
    4. Rerun MS FixIt http://go.microsoft.com/?linkid=9875022 to delete all .exd files again or
      do it manually: http://support.microsoft.com/kb/3025036/EN-US
    5. Open, confirm and Save in Excel 2010
    6. Done, Repaired! -- now the xlsm file can be run in both 2007 and 2010 w/o 'Invalid Object library' error.






    Wednesday, January 7, 2015 9:08 PM
  • Hi Kwlee324,

    Thanks for sharing the workaround with us. It would be very helpful for others who have the same issue.

    Also I found a two useful links about the error message "Object library invalid or contains references to object definitions that could not be found":
    https://support.microsoft.com/kb/2703186

    http://blogs.msdn.com/b/vsod/archive/2009/06/05/visual-basic-6-controls-stop-working-after-security-advisory-960715.aspx

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, January 9, 2015 6:08 AM
    Moderator
  • I am having this problem too. It happens when I open a workbook after some other users (not all, but more than one) make updates in it. It also seems to be related to the December update. kwlee324's workaround doesn't work for me since I can't select the VBAProject in References.

    My own workaround has been to copy all of the sheets (not move them, because deleting a sheet causes Excel to crash in this case) over to a new workbook, then copying any of the remaining VBA modules and classes as well.

    But this workaround is not good enough! I can't keep working this way. I need serious support from Microsoft to get this resolved. Who can I turn to?

    Wednesday, April 1, 2015 1:18 PM
  • I too am having this problem.  The only workarounds that work so far for me  are to copy the data from each sheet into a new workbook,  or to temporarily disable Macros.   Neither is really an acceptable solution for us -- but we aren't able to use the solution above as the tools->references option on the VB debugger that comes up when I attempt to open the document  is greyed out.   So, my question is, is there something that I need to install in order that I can use this solution to access these references and fix the documents so I read them ?   (or, at least, figure out what references are missing so everything WILL compile?)       Please advise.

    Wednesday, May 6, 2015 1:20 AM