+ Reply to Thread
Results 1 to 3 of 3

"Can't find project or library" error when opening workbook

  1. #1
    Registered User
    Join Date
    06-14-2012
    Location
    Cambridge, UK
    MS-Off Ver
    Excel 2013
    Posts
    48

    "Can't find project or library" error when opening workbook

    Hi,

    Immediately after opening some spreadsheets the following error is displayed and then Excel crashes completely and closes down.

    "Can't find project or library".

    The problem can be resolved by:
    1. Opening the offending file in safe mode
    2. Recompiling the VBA (VBE > Debug > Recompile VBA Project)
    3. Save & close
    After going through this process the file will open correctly next time.

    As you can see from the sequence of steps there is no actual change to the file to get it working again, just recompiling the code. I've no idea what is causing this and it's driving me mad. Often the same issue will reappear sometime later and it affects several files. Manually fixing the files using the above steps is not sustainable.

    One last thing to mention is what the problem IS NOT: There are no missing references in VBE > Tools > References.

    Anyone that has any clues as to what might be causing this would be greatly appreciated.

    Thank you
    <--- Please click the star to say thank you

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: "Can't find project or library" error when opening workbook

    Hi,

    Have you tried exporting all the code from the file and then reimporting it again? (the CodeCleaner add-in can do this for you)
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    10-31-2014
    Location
    Westchester, CA
    MS-Off Ver
    2007, 2010, 2013
    Posts
    1

    Re: "Can't find project or library" error when opening workbook

    Thank you for posting, this was very helpful.

+ 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. [SOLVED] "Can Find Project or Library" Error message hep please ,
    By Hassan1977 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-18-2015, 12:53 PM
  2. [SOLVED] Excel VBA Error: "Can't find project or library"
    By dash11 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-07-2013, 06:35 PM
  3. UCase causes "Unable to open project or library" error
    By valkok in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-16-2011, 06:05 AM
  4. "Compile Error: can't find Project or Library"
    By ElmerS in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-10-2010, 05:46 AM
  5. "Compile Error Can't find project or library."
    By mike allen in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-10-2005, 12:05 PM
  6. "Can't find project or library" error message
    By Stefi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2005, 04:05 AM
  7. [SOLVED] Trapping the "Can't find project or library error"
    By Ajtb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2005, 08:06 PM

Tags for this Thread

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