+ Reply to Thread
Results 1 to 13 of 13

Cannot save VBA library references

  1. #1
    Registered User
    Join Date
    03-20-2018
    Location
    Singapore
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    68

    Exclamation Cannot save VBA library references

    Hi, I am opening a macro workbook on another computer.

    I activate the various libraries under Tools > References, then save the VBA and the workbook.

    When I close the document and reopen it, all these references are gone.

    Cannot save the VBA library references with the workbook.

    How do I troubleshoot and solve this issue?

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question

    Hi !

    Same issue with another workbook ? Try to save as a new name and checking the workbook type (binary or macro) …

  3. #3
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Cannot save VBA library references

    You can use VBA to add reference libraries, but you need to know the full path and filename of the library. Such as...
    Please Login or Register  to view this content.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Cannot save VBA library references

    This part...
    ..on another computer.
    Can it be that you don't have the same libraries installed on both computers?
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  5. #5
    Registered User
    Join Date
    03-20-2018
    Location
    Singapore
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    68

    Re: Cannot save VBA library references

    Quote Originally Posted by CK76 View Post
    This part...


    Can it be that you don't have the same libraries installed on both computers?
    The libraries are clearly installed on both computers therefore I am able to tick the checkboxes on the relevant libraries. Just that when I save, close and open the workbook again, the references are gone

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Cannot save VBA library references

    Do you have any code saved in the workbook?
    If not add some dummy code like Debug.Print “sometext”. And save workbook.
    Without code project will not be saved with workbook and all references will be lost.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Cannot save VBA library references

    Are you adding any code to the workbook?

    Are you saving it as macro-enabled/binary?
    If posting code please use code tags, see here.

  8. #8
    Registered User
    Join Date
    03-20-2018
    Location
    Singapore
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    68

    Re: Cannot save VBA library references

    There's definitely code in the workbook and it is definitely .xlsm format

  9. #9
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Cannot save VBA library references

    Where are you opening the workbook from?
    Rory

  10. #10
    Registered User
    Join Date
    03-20-2018
    Location
    Singapore
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    68

    Re: Cannot save VBA library references

    I am able to save the workbook with references and open it without issues from Windows Explorer on one computer..

    somehow when I do the same on another computer, the references are gone every time i reopen the file

  11. #11
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Cannot save VBA library references

    Is this true for all workbooks? Also, are you saving the workbook through the main Excel window or the save button in the VBE? The latter is notoriously fickle.

  12. #12
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow


    As we are expecting OP answers since post #2 …

  13. #13
    Registered User
    Join Date
    03-20-2018
    Location
    Singapore
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    68

    Re: Cannot save VBA library references

    Hi, solved it... apparently there was a reference to MS Word 16.0 and I checked version 15.0 as well, so due to the conflict it wasn't saved when I closed and opened the file

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Different Excel Library References
    By ikslohap in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2015, 10:27 AM
  2. Missing Object library in references tab
    By Rokn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-21-2014, 11:23 AM
  3. [SOLVED] Object Library References not transferring
    By allenj3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2006, 02:55 PM
  4. [SOLVED] VBA Library References - deployment issue
    By Chris Leroquais in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2006, 05:00 AM
  5. VBA Library References - deployment issue
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2006, 05:10 PM
  6. Object Library References
    By Fox via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2006, 02:55 PM
  7. Can you automate object library references?
    By Chris W. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2005, 06:06 AM

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