Excel – Lost VBA when downgrading from Excel 2013 to Excel 2010

microsoft excelmicrosoft-excel-2003microsoft-excel-2010microsoft-excel-2013vba

I am on Windows 7. In the past I was using Excel 2003. I installed Office 2013 and found that my Office 2003 was intact and I could run both versions. I made updates to some worksheets using Excel 2013 and VBA code.

I was informed that I needed to use Office 2010 (I won't go into the reasons) so I uninstalled Office 2013 and installed Office 2010 (Corporate licenses). When I open the spreadsheets that I modified using Excel 2013 in 2010 I get a Microsoft Visual Basic for Applications message:

Class not registered. Looking for object with CLSID:(AC9F2F90-E877-11DE-9F68-00AA00574A4F)

When I hit Ok, I get the Excel message

Excel found unreadable content in name_of_spreadsheet.xls. Do you want to recover the content of this workbook?

If I select YES then I get a message that reads

Excel was able to open the file by repairing or removing the unreadable content. Lost Visual Basic project. Repairs were made to PivotTable report, One or more invalid conditional formats were removed from the workbook and Lost ActiveX controls.

Now the VBA code is not found. The workbook opens and looks normal, but buttons running VBA don't work, and when opening VBA (Alt+F11), I don't see any of the modules.

I tried running the FM20.dll using regsrv32.exe and I get a message which says:

The module fm20.dll failed to load. Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files. The specified module could not be found".

But I ran regsrv32 from the subdirectory the FM20.dll was in.

I presume my problems have to do with losing the Visual Basic project and/or ActiveX controls.

What do I need to do to be able to find the VBA code that was there before removing Excel 2013 and installing Excel 2010?

Best Answer

I had a similar problem. I used a different fm20.dll file from another computer that had not been "upgraded" to 2013 yet. Registration of fm20.dll went fine and my problem went away. It seems the fm20.dll file was corrupt. Any VBA that has Userforms seem to be affected. The Excel 2010 error that I recieved was: "The visual basic for applications (VBA) macros for this workbook are corrupted and has been deleted. The macros corruption most likely exists in the current file. To recover the macros, open up a backup copy of this file if you have one." A simple test of opening a VBA workbook with only code, which worked, and a simple file with a Userform which had one label on it with no code, which failed, led me to the fm20.dll file. I got the same message trying to register the fm20.dll file on the problem system, saying the file was bad. Copied a new fm20.dll from a good system, registration went fine, problem went away.

Related Question