none
VBA excel Compile Error can't fine project or library RRS feed

  • Question

  • Hi there I was working on a VBA Excel project (excel 2010) and it was working fine in my PC and the file was saved in a common network location

    vba the vba is chaning a mswork booksmarks(ms work file is saved type (word 97-2003 Document) with excel cell values

    But when my line manager open the file and run the vba Micro it though compile error can't find project or library

    What should I do to get rid of this error
    in his PC under Tool -->Referrece Microsoft Word 14.0 Object library shows as missing and it is not in the avaliable reference so where can i get that one

    Tuesday, April 10, 2012 9:29 AM

Answers

  • You'll keep on having these problems if you have users with different versions of MS Office.

    One option is to use late binding for Word instead of early binding. You won't need the reference to the Microsoft Word 14.0 Object Library.

    See http://support.microsoft.com/kb/245115

    Another option is to give each user an individual copy of the workbook. Your user could clear the missing reference, then tick the reference for the version of Word on his/her PC.

    Word 2007: Microsoft Word 12.0 Object Library
    Word 2003: Microsoft Word 11.0 Object Library
    Word 2002 (XP): Microsoft Word 10.0 Object Library
    Word 2000: Microsoft Word 9.0 Object Library


    Regards, Hans Vogelaar

    • Marked as answer by Rushdy Najath Wednesday, April 11, 2012 9:14 AM
    Tuesday, April 10, 2012 10:15 AM

All replies

  • You'll keep on having these problems if you have users with different versions of MS Office.

    One option is to use late binding for Word instead of early binding. You won't need the reference to the Microsoft Word 14.0 Object Library.

    See http://support.microsoft.com/kb/245115

    Another option is to give each user an individual copy of the workbook. Your user could clear the missing reference, then tick the reference for the version of Word on his/her PC.

    Word 2007: Microsoft Word 12.0 Object Library
    Word 2003: Microsoft Word 11.0 Object Library
    Word 2002 (XP): Microsoft Word 10.0 Object Library
    Word 2000: Microsoft Word 9.0 Object Library


    Regards, Hans Vogelaar

    • Marked as answer by Rushdy Najath Wednesday, April 11, 2012 9:14 AM
    Tuesday, April 10, 2012 10:15 AM
  • It seems you developed a macro that uses Word Library. So, probably, your code uses early binding. As Hans said, you should convert it to late binding, but if you want to keep using the early binding, just set the Word reference to the lowest Office version you have in all computers.

    Ex: if you use this workbook on a machine with Word 2010 and 2003, you should, at 2003's computer, enter in the References' VBE window (just Alt+F11 to go to VBE, menu Tools >> References), uncheck the missing reference and set Microsoft Word 11.0 Object Library, because according to Hans' table, the library for Word 2003 is the 11.0.


    Felipe Costa Gualberto - http://www.ambienteoffice.com.br

    Tuesday, April 10, 2012 12:21 PM
  • Oh... I've the same problem with MS Access, but, the same version of MS Office (2010) against a different operating system. When I reference the MS Word 14 on Windows 8 I get this type of problem if I re-open accdb file (MS ACCESS) on another computer with MS Windows 7.

    What I can do about that? Seems that both PC have the same DLL but it is referenced in different path between windows 7 and 8, In fact, if I remove and then re-add the reference to the library on the "on error Pc'", all seems to work fine after that!

    What I can do?

    Thank so much, any help would be appreciated!

    Daniel


    Daniel Grandis

    Tuesday, June 18, 2013 7:37 AM
  • Late binding should solve that too.

    Regards, Hans Vogelaar

    Tuesday, June 18, 2013 12:21 PM