VBA window shows list of modules but does not show any code

  • I was unable to find someone with the same issue so I am posting it here in case it happens to anyone else.
    It appears something happen to a saved excel file because when I open the file it says "Cant find project or library" but after pressing OK I open to the vb window and I can see all my modules listed. However when I try to click on any module or worksheet to see the code all that comes up is an empty white box (no code). See attached 'no vb showing' image of what I mean. Note there is no option to compile code either.
    Then when I close the file it says the missing library message again and excel crashes (see excel stop working file attached)
    I will continue to try and find a solution, just wondering if this has happened to anyone else?
    Thanks!

  • So after a few hours I finally was able to figure it out. Here is what I did:
    Open a new excel instance
    From there I click browse to get to the file, and I hold down the shift button and open file
    When "enable macros?" screen comes up I disable macros.
    I do NOT enable content (yellow bar at top). I go to vb code screen and write in Stop in first line of workbook open procedure
    I save and close the file then reopen it normally and enable content. The code will take me to the Stop line in workbook open. I stop the code and remove the 'Stop' line in workbook open procedure. I save the file, close and reopen
    Now all my coding in all modules appear!
    I hope this will help someone else should they come across this weird issue

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!