# Office 365 >  > [SOLVED] Excel Saving problem

## Bezzie

I have a large Excel model (250mb). This file has been running on Windows 7 + Office 2010 without problem for the past 3 years.

Want to test the model on Windows 10 + Office 365 but ran into a snag. Yesterday I opened the file, imported some data, saved the file, ran the model and saved the file, no problem. Then I opened the file again, imported some data and on saving Excel just shut down. No message no nothing. Restored a backup file, imported the data, saved the file, ran model and saved the file, no problem.

Today I open the file. Import the data and on saving the file Excel shut down. Restored a backup file and open file. Success up to here. Import the data and on saving the file Excel shuts down. Restore a backup file and open the file. Again success up to here. Without doing anything, I just click the save button and Excel shuts down.

The moment the file tries to save Excel shuts down. No message or anything. Restarting Excel tries to repair the file and if it gets the file open it just shuts down again when trying to save.

This happens on clicking the save button or when trying to save out of VBA code.

Any ideas?

----------


## Tsjallie

Try saving the file as xlsb.

----------


## Bezzie

Thanks. Saved it as such and was able to open and save the file. So far so good.

Will test it further when running the model.

Added bonus is the file size that are now less than half of what it was before :Smilie:

----------


## Bezzie

No Joy. Worked the one day and the problem returned in a new disguise.

Now the model opens, stay open for 2-3 seconds and then closes/crashes. No message no nothing. Trying to reopen the model then just gives a message that there is not enough memory for this operation and suggests to add memory or try the 64bit version. :EEK!: 

There is 16gb memory in the machine and it is Office 365 64bit (has been from the start). Restarting the machine will allow the one attempt to open, shut down and then the memory is suddenly not enough anymore!

Tried opening the file in Excel in safe mode but then sit and watch a turning circle and that is how far I get. File doesn't open, just the circle turning for ever :Mad: 

Tried disabling any add-ins. No change.

Made sure Windows and Office 365 is up to date. No change.

Followed other suggestions like Turning off Display Hardware Acceleration or something. Updated display card drivers. No change.

I accept that there is something wrong in my file (other Excel files opens with no problem) but are unable to track it down as I can't get it to open and stay open successfully.

This is frustrating beyond words :Mad:  :Mad:  :Mad:

----------


## Bezzie

Also tried repairing Office 365 (several times!). No change.

----------


## Tsjallie

Sorry to hear this bad news. Even more sorry that the internet is loaded with these kind of experiences with Excel. Yet more sorry to see Microsoft systematically ignoring it.  :Frown: 
Not that I've any hope I can do something usefull, but still ... can you upload the file.

----------


## Bezzie

Problem found. Turned out to be a function that were run in the Workbook_Open event in ThisWorkbook. There is nothing wrong with the function. It's run multiple times during the run of the model. There is some timing issue with the open of the workbook and the run of the function.

Removed the function from that event and voila!

Thanks for the input.

----------


## Tsjallie

Happy to hear that yr workbook is allright now. :Smilie: 
Maybe best to move the function from Workbook_Open to Workbook_Acitvate.

----------


## Bezzie

And unfortunately the problem has returned this morning. Have been running the model:on laptop with Windows 7 and Office 2010 -> still running without any problem .xlsm fileon desktop 1 with Windows 7 and Office 2010 -> 5 runs without any problem .xlsb file - today this one stopped working (message: Excel has stopped working)on desktop 1 with Windows 7 and Office 2010 -> copied a backup .xlsm file to this machine - 2 runs successful and it stopped working (message: Excel has stopped working)on desktop 2 with Windows 10 and Office 365 -> 5 runs without any problem .xlsb file - today this one stopped working (No message - Excel just shuts down couple of seconds after opening file)on desktop 2 with Windows 10 and Office 365 -> 5 runs without any problem .xlsm file - today this one stopped working (No message - Excel just shuts down couple of seconds after opening file)
I can't figure this problem out :Confused: 

What is weird is that one of the machines (laptop) still run successfully while the other two has stopped working on the same day :EEK!:  (What did change on desktop 1 this morning is some Office updates installed that I know of but the .xlsm file did run successfully for two runs before the problem started again. I will try to roll back the updates and see what happens then. On desktop 2 with Win10 I don't know if updates installed this morning.)

There is a custom ribbon in the model. It could be that the problem might be with this. Normally when opening the file it opens and a second or so later the menu item for the custom ribbon appears. It looks like Excel stops working at this moment as the menu item does not appear when Excel shuts down.

----------


## Tsjallie

What is the workbook doing?
Any tables changed (rows added or removed) while the have conditional formatting?
Any Datavalidation list pointing to tables or named ranges which are being expanded or shrinked?
Any listboxes with rowsource point to tables or named ranges which are being expanded or shrinked?

----------


## Bezzie

Sort of a *what if* workbook.
Bunch of tables changes with every run as data gets added every day. Lots of formatting of cells but very little conditional formatting.
Very little data validation and the ones that are there are in tables that does not get changed.
No listboxes used.

Excel collapses right after opening the workbook before anything is done in the workbook. I checked that there is no code in any of the worksheet events that might try to run on opening the workbook.

There are formulas (but not many) in the workbook that could recalculate when the workbook opens but I turned automatic calculation off.

Most of the work is done in VBA and the collapses occur before any of the VBA code is run (that I know of).

Yesterday the .xlsb workbooks (two different desktop PCs) opened but then hanged when trying to do anything (saving or trying to run any of the macros).

Copied a backup of the model .xlsm files to the two desktop PCs and it opened and I was able to run them successfully. Will have to see what happens when I try to open and run them today. This is where I run into trouble every day or so. I copy a backup and open/run for a day or two and then it collapses again.

I'm still wondering if the problem is maybe with the custom ribbon. I removed it yesterday and then the model opened but then I didn't have any buttons to click to see what happens.

----------


## Tsjallie

> Bunch of tables changes with every run as data gets added every day



When the macro is adding rows is there a DoEvents after creating the new row?
Somehow what you describe reminds me of a situation I had with some workbook.
Adding a DoEvents after creating new listrows made Excel behave normally.
Still interested in the workbook to have a look.

----------


## Bezzie

Behavior is getting weirder!

I copy the model from the laptop, where it's been working without a problem, to the two desktops.

On the desktop with Windows 7 and Office 2010, same as laptop but with updates installed, the model opens up to the point where it would normally add the menu items Add-ins and the custom ribbon menu item. Then it hangs there with blue circle running. I left it for 5 hours yesterday and still stood at that point. Had to end it with Task Manager to close it.

On the desktop with Windows 10 and Office 365 the model opens and I can then run the model. The model saves itself after it run. If I then close the model and try to reopen it I'm back to the point where the model opens for a couple of seconds and then just shuts down. I copied a older version of the model to this desktop, opened it and ran a couple of days, one after the other but without closing it between the runs. Every day runs without a problem. Then I close the model and on trying to reopen I'm back at the problem again :EEK!:  It opens for a second or two and then shuts down.

Tried a different PC yesterday, also Windows 10 and Office 365, and the same thing. Opens first time, ran successfully, close model and on trying to reopen the model it opens for a second or two and just shuts down.

Spoke to the boss and he says I can't send the model as there are confidentiality and proprietary stuff in it :Frown: 

The crash/shutdown occurs before any of the code is run. It's happening on opening the file. The event log reports "Faulting module name: VBE7.DLL, version: 0.0.0.0"

----------


## Tsjallie

Maybe searching Google with "Faulting module name: VBE7.DLL, version: 0.0.0.0" will lead you a solution.
This one seems promising, but there are many more.

----------


## Bezzie

Found the one about the recompile already. Busy doing that. Trying a few other suggestions I found as well. Haven't seen the one about the registry entries but will also do that suggestion and see what happens. Will let you know if there is any improvement.

----------


## Bezzie

So far so good. 

Seems the registry entries suggested (but might be a combination of suggestions - I tried everything :EEK!: ) did the trick :Smilie: 

Able to open, run, save, close and open the model on the Windows 10/Office 365 desktop. Been working for four days now.

Busy setting up another desktop with Windows 10/Office 365 to test as well. Will run for a couple more days to see what happens.

On the other desktop with Windows 7/Office 2010 it worked for a day or two. I then tried to run a .xlsb file which crashed and since then I've not able to open the model again. Not the .xlsm or the .xlsb model.

Only working with .xlsm now but even this one does not work. Copied a backup from the laptop, no joy. Just the 'Excel has stopped working' message and then everything freezes. Repairing Office did not help either.

----------


## Tsjallie

Good to hear that you're at least making some progress.
I know you can't upload the workbook, but would you be allowed to upload just the vba-code (or send it by mail).
Maybe from experience I'm able to spot any lines that may trigger one of the many bugs in Excel.

----------


## Bezzie

All still good. Have it running successfully on 4 machines. Two with Windows 7/Office 2010 and two with Windows 10/Office 365.

Will continue testing on these machines for a few more days and if there are no further problems mark the thread as resolved.

----------


## Bezzie

Still happiness :Smilie: 

One desktop PC still gives problems (few other issues on this desktop as well. HDD was changed to a SSD and OS was transferred using Samsung Data Migration, so think that is where the problems arises from). Will reformat the drive and reinstall everything and see what happens then. Just need the courage to start :EEK!:  

Other three PC's still going strong. More than a week now and no issues on these three PC's.

----------


## Tsjallie

Good to hear you're still happy (again). :Smilie: 
And yes, when using Excel you need to be courageous  :Wink:

----------

