+ Reply to Thread
Results 1 to 6 of 6

Cannot find project or library - all vba-code gone!

  1. #1
    Registered User
    Join Date
    12-10-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2010/Excel 365
    Posts
    26

    Cannot find project or library - all vba-code gone!

    Hi everyone,

    An Excel-file that has been working just fine for a looong time has recently started to behave in a strange way ...

    I resave it when it works, just to be sure I have a working file. Next time I open it this message might appear:
    "Cannot find project or library", and ALL vba-code is gone, both in Modules and in Sheets?! Everything is gone (and there is a lot of code)!

    Does anyone know what may be wrong?

    I haven't noticed any other problems/strange behaviour that could be related ...


    Please, help me!

    Kind regards
    /lassebasse

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cannot find project or library - all vba-code gone!

    Are you using it in a different environment?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    12-10-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2010/Excel 365
    Posts
    26

    Re: Cannot find project or library - all vba-code gone!

    Hi Richard,

    Thanks for your reply.

    No, I'm using it on the same computer/same enviroment all the time.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cannot find project or library - all vba-code gone!

    It's strange. I've known the message about missing project library but never both the library and project where the code is no longer present. Is it being saved across a network or to a local PC?

    Does this happen every time you save it with a different name presumably and then reopen it or only occasionally?

  5. #5
    Registered User
    Join Date
    12-10-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2010/Excel 365
    Posts
    26

    Re: Cannot find project or library - all vba-code gone!

    Yes, very strange.

    I have saved the file on an external harddrive, not directly on my computer.
    When I update the file I 1) connect the harddrive (USB), 2) open the folder/file, 3) make changes, 4) save the file and 5) close file/folder and disconnect the harddrive (the safe way).

    This happens accasionally. Often the file is all ok when I have made changes. Next time I connect the external harddrive and open the file, it may be ok or it may not (even though I haven't saved it with a new name). This problem occurs occasionally when I open the file from the external hard drive ...


    When I try to open Modules-/Sheet-code the window never opens! It "half-opens" and is all empty/white (code "gone" because all is just white).
    I cannot see "Tools - Refences", nothing happens when I try ...


    (I have a lot of other Excel-files in different folders on the same external hard drive (with less code). I don't use them as often, but I have never had any problems with them).
    Last edited by lassebasse; 10-25-2021 at 03:28 AM.

  6. #6
    Registered User
    Join Date
    12-10-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2010/Excel 365
    Posts
    26

    Re: Cannot find project or library - all vba-code gone!

    Hi,

    I just saw the notice about attaching an example file, but I don't think that's possible. This Excel-file is quite big with a lot of modules (and sheets) where each module/sheet contains different amount of code, and on top of that, 99% is personal data.

    If I were able to clear this file from personal data, there would probably be nothing left to look at ...


    Is there any other way to get help on what could be the problem in this matter?
    Last edited by lassebasse; 10-28-2021 at 04:06 AM.

+ 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. Can't Find Project or Library
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 39
    Last Post: 07-13-2021, 12:02 PM
  2. Can't find project or library
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-29-2020, 04:24 AM
  3. Can't find project or library
    By Maleficent in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2019, 06:53 AM
  4. Can't find Project or Library, then no Project
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2017, 09:35 AM
  5. Cant Find Project or Library
    By Biplab1985 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2016, 02:30 PM
  6. Can't find project or library - MS Forms 2.0 Ojbect Library
    By RTSmith in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-11-2012, 06:51 PM
  7. Code to fix: 'can't find project or library'
    By EWR in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2005, 03: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