excelvbavbe

Corrupt VBA Project Module Not Found Error


I have a workbook that was saved yesterday afternoon, and was working perfectly. I have opened it this morning, and none of the modules in the VBE are 'found'. Visually I can see them all sitting there.

enter image description here

When trying to open any of these modules to edit the code, the windows are greyed out, as below.

enter image description here

When I try exporting the code modules, I get the 'Module Not Found' errror.

enter image description here

Does anyone know a) why this has happened, and b) how can I fix this?

I thought initially it was the instance of my Excel, so have restarted the PC.

Any help is appreciated!


Solution

  • I managed to find a workaround to this problem, so sharing the solution in the event that someone else comes across a similar problem.

    It seems that the VBA Project got corrupt somehow. Below, find some suggestions and workarounds in trying to solve something similar in the future.

    1. This is what worked for me. Convert the .xlsm file to a .xls file. You can do this by changing the file extension when renaming the file.
    2. You can also try to convert to .zip file type, and then convert back to .xlsm. Note: convert COPIES of your original, just in case.

    Other suggestions (as Chris Nelisen suggested) are: