Share via

Excel Macro-Enabled Spreadsheet Keeps Getting Corrupted in Office365 while saving

Anonymous
2021-02-27T00:49:27+00:00

I have been working with Excel VBA for many years and have developed some fairly large and complex applications for my work.  In the past, I only worked in a stand-alone environment, not the blended environment of Office 365.  What I have begun to experience in the past several weeks is new to me and extremely frustrating.  I have a several Excel VBA projects that I am developing at the moment which have all begun to have a very odd problem.

The workbook appears to be fine when I open it, and everything runs as designed.  However, when I save and re-open, I get the following error message:

The recovered file is a complete mess.  All that remains is the raw data on the spreadsheets.  All active-x controls, images, and cell formatting is lost.  The 

VBA project has a second instance for every spreadsheet as well as duplicate of ThisWorkbook.  I have to completely rebuild these workbooks from scratch and can't figure out why they are blowing up.  Essentially, all appears to be fine until it it not, and I only find out when I save and re-open the file.

My issue is very similar to the one addressed in the thread below.

https://answers.microsoft.com/en-us/msoffice/forum/msoffice\_excel-mso\_other-mso\_o365b/macro-enabled-excel-getting-corrupted-in-o365/ec8fa012-da24-44a9-b26c-6536596e09cc

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2021-03-04T14:43:31+00:00

    I will try the new user account, but creating a new large project with multiple user forms, modules, etc. seems counterproductive. I've been building these workbooks for months. I can't just whip one out in an afternoon to test if it fails in a new user profile. As I am not able to predict when the issue will arise, if the problem does not recur, which I suspect it will not for a smaller, less complex workbook, I will be no closer to finding a solution.

    There are hundreds of people who have reported very similar issues. Is there no way for Microsoft to take a analyze a specific file and pinpoint the problem so that corrective action can be taken to prevent it in the future?

    Was this answer helpful?

    60+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-03-01T22:58:55+00:00

    Neha,

    Thank you for responding to my post. Perhaps I did not make myself clear. I need to figure out what is causing this so that I can prevent if from happening. It started about a month ago and it's happening with significant frequency as I am trying to complete these VBA projects. When I follow the instructions to recover the project, I get the following error indicating that I have a problem on one of my spreadsheets.

    In this instance it happens to be Sheet5. At other times, the error was credited to other sheets. When I open the VBA Project, I now have a Sheet15 which has the code associated with the "Orders" tab on the workbook. All formatting and active-x controls on the Orders tab have been lost. But now the Orders tab is designated as Sheet1 and Sheet5 is the Proposal Amount tab.

    Image

    I can export the code from this new Sheet15, but I cannot remove this element from the project.

    Image

    After completely rebuilding the spreadsheet multiple times, the issue keeps recurring. The program works until I try to save it. Then when I open it, I get the error message stating that a problem was found. I rally need to figure why this is happening so I can eliminate the cause, because it blows up almost immediately. I have reinstalled Office365 on my computer and the issue continues to occur.

    Note that our office uses OneDrive to backup our local computers to a SharePoint server. Not sure if this could be contributing to the files getting corrupted during the save process.

    My system info is below;

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2021-03-02T14:54:16+00:00

    I have experienced the issue when the file was saved to a jump drive which is not backed up by OneDrive.

    Others in my organization have experienced the same issue with the file.

    The error first presented itself prior to upgrading to 64-bit Office365 (I had been working with the 32-bit version)

    I'm seeing this issue with two different workbooks.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2021-02-27T04:10:07+00:00

    Hi JeffPellegrin1,

    Please try the manual process to recover the workbook. For this, follow the steps below:

    1. Close the corrupted workbook if opened.
    2. In Excel, click File>Open>Browse. Navigate to the location and folder that contains the corrupted workbook.
    3. In the Open dialog box, select the corrupted workbook.
    4. Click the arrow next to the Open button, and then click Open and Repair.

    There are some other ways that you can try to recover the data, for this, follow the steps from the following support article:

    Repairing a corrupted workbook

    Besides, please ensure your Microsoft 365 apps are fully updated, sometime updating Office fixes issue. To check version information, open any Office app, such as Excel or Word, click File>Account, check for the info mentioned under Product Information. The latest version of Current channel is 2101 (Build 13628.20448). For other channel version info, see Update history for Microsoft 365 Apps (listed by date)

    If the version is not updated as mentioned in the article, please install updates and check if the issue remains. To know how to install updates, see Install Office updates.

    if the issue remains, please repair Office apps from Control Panel instead.

    1. Click the Start button > Control Panel. From Category view, under Programs, select Uninstall a program.
    2. Click the Office product you want to repair, and then click Change and select Online Repair.

    Please try Online repair. Quick repair only detects and then replaces corrupted files, and an Online repair option will do a complete repair; it will take a few extra minutes to repair Office applications.

    If the issue persists,****please provide us with the following information:

    1. Please provide the screenshot of Microsoft 365 Product Information. To get this screenshot, open any Office app on the system that has this error, click File>Account, capture the screenshot of all the information mentioned under Product Information.
    2. Do you get the error only in the workbook that contains macros? What about the workbook which are in another format such as .xlsx or xls?
    3. May I know if the error occurs in a specific workbook or all the other macro workbooks have the same problem?

    Please try the above suggestion and let us know. Have a nice day and stay safe😊

    Regards,

    Neha

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2021-03-02T07:14:45+00:00

    Hi JeffPellegrin1,

    Is it possible for you to store the workbook to your local computer rather than SharePoint?

    Besides, please share the workbook with your colleagues and check if they can open the workbook without any error.

    Also, may I know if the error is with a specific macro enabled workbook? Did you started getting error after Office update?

    Regards,

    Neha

    Was this answer helpful?

    0 comments No comments