Excel 2013: Lost VBA Code From Excel 2010

Just upgraded from Office 2010 to Office 2013.

Tried to open several of my Excel spreadsheets created in 2010 with Excel 2013. I have spreadsheets that have VBA to perform several functions and routines.

None of the .xlsm spreadsheets from 2010 work in 2013. I get the following messages:

"The Visual Basic for Applications (VBA) macros in this workbook are corrupted and have been deleted. The macro corruption most likely exists in the current file. To recover the macros, open a backup copy of this file if you have one."

OR ...

"We found a problem with some content in '*******.xlsm'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes."

Clicking Yes does not help. It removes or tries to fix the issue. Under the developer tab, the "Visual Basic" and "Macros" button is disabled.

I tried 3 of my different workbooks. They all get the same error. I went back to an Office 2010 installation and all the workbooks open file - without error, and the code executes.

Advice?

March 16th, 2013 3:08am

I just found myself into the same boat today, but Excel is not complaining about anything though. It is my first experience opening file with macros since my upgrade to 2013 and not a good one :(

Opened an Excel 2010 .xlsx file and all macros can't be found, even though they are enabled in "Macro Security" menu. I also tried the "trust access to VBA project object model" but nothing helped. In the VBA Editor, everything is totally blank in Excel 2013, no code at all, but I can still add new functions to it and it works well.

If anyone has an idea or have been in the same boat ... thanks in advance !

NOTE:
I don't think it is very significant, but my Excel 2010 was x86 and the new Excel 2013 is x64.


  • Edited by HoudWarZ Monday, March 18, 2013 1:47 AM
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2013 4:41am

Update:

I don't believe it would solve your issue as you describe it Gary, but for all the other people who might come to think they have lost their macros just like me, the macros were not part of the Excel file in my case but were stored in the file "PERSONAL.XLSB" (Google it if you don't know about it, basically it is a shared macro store) located in "X:\Users\Account\AppData\Roaming\Microsoft\Excel\XLSTART\". Copied this file from a backup before my move to Windows 8 and now I have all my macros available again.

March 18th, 2013 5:29am

Hi,
Try to check whether you have enabled Visual Basic for Applications:
[1]. Open Control Panel;
[2]. Uninstall a program;
[3]. Right-click Office program to select the Change menu item;
[4]. Click Office Shared Features to see if Visual Basic for Applications is available.
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2013 9:32am

I'm getting the same problem, but with Excel 2010.

I've created a workbook with macros in Excel 2010 and couldn't run it in two computers with office 2010. The same problem as above occurs:

"The Visual Basic for Applications (VBA) macros in this workbook are corrupted and have been deleted. The macro corruption most likely exists in the current file. To recover the macros, open a backup copy of this file if you have one."

This problem happened with other 2 workbooks with macro. It's curious too that another workbook with macro created by me is working on these two computers without errors. And, of course, all of the workbooks mentioned works well in the other computers. This problem started when I downgrade the office os this two computers from 2013 to 2010.

None of the solutions proposed above has worked.

Any ideas?

Thanks in advance!

April 5th, 2013 11:14pm

Hey, I've got a way to turn around this issue for these workbooks.

That's not a quick solution, but it's effective.

I just copied all the sheets, connections, formulas and vba macros to a new workbook and saved. the new workbook worked in all computers.

Thanks again!!

Free Windows Admin Tool Kit Click here and download it now
April 16th, 2013 4:42pm

Just download and reinstall Office 2013. Worked for me.

Update: Well, it worked for a while anyway - aargh!

I just created a new workbook in 2013 and noticed that my macros in PERSONAL.XLSB were gone again. This without having done anything to the macros themselves.

And here I thought MS had quietly fixed this bug. Not.

April 20th, 2013 8:06pm

Same issue.   Online repair fixes temporarily.  Tried calling support, have removed and re-installed several times during that process.  Not getting anywhere.   

I still have 2010 installed, and the worksheets open and macros function fine.  2013 issue.

Free Windows Admin Tool Kit Click here and download it now
April 26th, 2013 11:41pm

Almost the same:. My spreadsheets from Excel 2010 have buttons that work perfectly in Excel 2010.

But recently I updated to Excel 2013 and buttons dont work anymore and are ignored by subrutines, provoking errors.

Some months ago, using Excel 2007 the same problema appeared suddenly. It was provoked by a "security update". As son as I eliminated this troublesome update, the problem was over.

But now, Excel 2013 has been installed initially and no update has been done so  I cannot delete it. This initial installation, in my opinin, includes the undesired update and a patch is needed to solve this problem

Anybody can help?

February 27th, 2015 5:34pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics