locked
MAT LAB AND VBA ERROR : CANNOT FIND PROJECT OR LIBRARY RRS feed

  • Question

  • I am a IT intern. I upgraded a user's PC at my job. On his previous computer that had W7 OS, he had MatLab Installed. I installed MATLAB on his new computer (W10 OS). When he tested his MAT LAB through Excel and Microsoft VBA, he received this error message: “Cannot find project or library”. I went to tool >references and connected to the Spredsheet xlink. The admin suggested I download a newer version of MAT LAB, so I did. After downloading a new version, I received the error message : "Sub or function not defined"

    Why are error messages showing up? How can I resolve this issue?


    • Edited by Rizel Bobb Wednesday, October 26, 2016 4:35 PM
    Wednesday, October 26, 2016 4:35 PM

All replies

  • Hi RizelBobb,

    it seems that you did not reference the all the object libraries that are needed or you select the different version of the object library which is not supported in the current version of MS Office.

    also possible that you add some unnecessary references to the object libraries that is not going to be used in your code.

    please follow the steps mentioned below.
    (1) Open the Visual Basic Environment (VBE).

    (2) On the Toolsmenu, click References.
    (3) find the object library that appears as, "MISSING: xxxx Objects x.xLibrary."
    (4) Check it and Click OK.

    you need to take care about following things.

    • Once you find a missing item, the MISSING prefix is removed to indicate that the link is reestablished. If the file name of a referenced project has changed, a new reference is added, and the old reference must be removed.
    • To remove a reference that is no longer required, simply clear the check box next to the unnecessary reference. Note that the references to the Visual Basic object library and host-application object library can't be removed.
    • Applications may support different language versions of their object libraries. To find out which language version is required, click the reference and check the language indicated at the bottom of the dialog box.
    • Object libraries may be standalone files with the extension .OLB or they can be integrated into a dynamic-link library (DLL) They can exist in different versions for each platform. Therefore, when projects are moved across platforms, for example, from Macintosh to Microsoft Windows, the correct language version of the referenced library for that platform must be available in the location specified in your host application documentation.

    Reference:

    Can't find project or library

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 27, 2016 7:26 AM