I am using Excel 2007 (32Bit) on a Windows 7 64Bit machine.
I have a large Workbook with 12 sheets and 18 VBA modules.
All of my subroutines run flawlessly but one is causing the following issue:
The macro itself runs from start to finish successfully just as specified. After running the macro successfully, the workbook crashes, when I try to save it. It also crashes when AutoSave tries to save the workbook. The workbook does not crash when I simply close it.
By crashing, I mean that I get the message "Microsoft Office Excel has stopped working".
In the Windows Event Viewer I have identified the error message 0xc0000005.
In the folder where the workbook is saved, I find the temporary files that Excel creates when saving a workbook (named something like 9BB7B000).
I have tried to repair Excel in the Programs and Features part of the Control Panel but it has not worked. Furthermore no Add-Ins are enabled.
I suspected that the code module of the problem-causing macro was too large (90KB) so I split it up into two modules smaller than 64KB. However, the problem remains.
I would appreciate any help on this issue. I would like to get around reconstructing the workbook manually, if possible, as that would mean an enormous effort.
Thank you very much in advance.
Jochen
I had the same issue some time ago and carried out a research to identify the issue to no avail.
I noticed that it worked fine on workstations with better procs and more ram.
However the only way for me to proceed was to create a new workbook a one-by-one copy each worksheet from the old workbook and see which one is causing the issue. If the macro is causing the error then try to add a "sleep" command between loops so that the Excel file regains control and can execute and awaiting events/commands.
The post was 9 months ago, could you fix it?
What does that specific macro do? Because there are several solutions to this problem.
It seems that a certain "action" in your macro takes too long.
You can search for that specific action and us application.wait to slow your macro down. If this doesn't work, you'll have to find a way to reduce the "workload". But to do that, i'll need to take a look at your code.
Turn off the AutoSave function in Excel Options
Related
My macro-enabled workbook has been working fine until recently. It runs fine on my local drive, but no longer saves itself when run from a remote folder. I suspect some recent updates on the server are to blame.
If I open the workbook and press the save button, a pop-up appears with a progress bar for a second or two. This has not happened before, but the pop-up does close and allow me to continue.
When I run the macro in the workbook, the last line is ThisWorkbook.Save. The same pop-up appears and hangs. If I close the pop-up and press the save button, it also hangs now. If I choose File> SaveAs, all I get is a blank page with no folders to choose from.
I have a workaround to copy the workbook to a local folder, run the macro, then copy it back to the remote drive, but this may be difficult for my users to handle.
I made a new workbook with a macro that only calls ThisWorkbook.Save from a single button, and this works fine. The problematic workbook gets data from csv files and copies it into itself. Maybe this is causing a problem? Maybe the macros are too large for the anti-malware software to handle?
Does anyone know what recent changes have been made to Server that would cause my old macro to hang on saving?
I got the macro working, but not sure why.
The problem arose with an inefficient way to merge data from two sheets together. I had been using Find, and changed it to march through the data row by row instead. The saving window still pops up, but only for a second.
I don't know exactly why the old method prevented the workbook from being saved. The main difference is that the Find method uses objects, while the method I changed it to use integers and compare cell contents with an if statement. Maybe the memory was being filled with orphaned objects? I don't see what difference that should make when saving the file. The data in the sheets being saved is the same.
If anyone knows what difference this would make in saving a workbook, please add and answer or comment for posterity. It might help someone with a similar problem.
I am getting an error when opening excel: We found a problem with some content in XXX. Do you want us to try and recover as much as we can? if you trust he source of this workbook, click Yes."
clicking Yes, "fixes" the issue but deletes a lot of VBA code, two weeks worth.
Whatever the issue it was introduced yesterday, I do not want to redo two weeks worth of coding. Is there anyway I can view what was removed, or open the VBA in notepad++ or something without opening the excel?
I opened another excel workbook and tried all the different options for the argument XlCorruptLoad in the Workbooks.Open to open the corrupt workbook. I noticed that there were two non existing sheets created in the project explroer of the corrupt workbook that had the code in there. I am not sure if it did that s a result of what I did or it was there all along and I did not notice it
Note that the reason I had a corrupted data is because the code was extracting a list and putting it in a cell validation formula..i guess I overloaded it.
Like suppose, your .xlsm file is about more than 5 mb
It has more than 20 sub procedures any many more. Many inbuilt formulas & functions are used in the background on the excel sheet. Yes, more than 20 Excel sheets. So this is how large Excel VBA Application looks like.
Now, I found one issue with the large application, It stops working or freezes or not respond when your application is open in your system for more than few hrs without having any action on it!
Yes, and as soon as you activate your workbook after a long hr of other work, workbook almost freezes or showing not responding. and we need to close the excel file anyhow for further any process.
It's very common encounters who has worked on large excel files. Please discuss here the reasons, causes, and solutions.
I am developing an excel "application" that will be distributed to a few users, so it has a lot of macros/vba code on it. The workbook is about 2MB right now, so it's not incredibly big.
I was developing it on excel 2013, however my workstation had a problem and I had to work on it from a computer with excel 2010 for about a week. Problem is, when I came back to excel 2013, whenever I try to save the workbook(on excel 2013) it immediatly stops responding. When the program closes, excel is never able to recover anything and says the file is corrupted. The problem simply does not occur on excel 2010, where everything works perfecly and I can save it OK.
Does anyone have any idea what might be causing this? I have tried removing a few sheets and saving the workbook afterwards, to test if a specific sheet was corrupted/causing problems, but even after I remove all the sheets from my woorkbook (and just leave a new blank sheet on it) it still freezes when I try saving.
It's important to note that the workbook in question uses a lot of excel features, meaning it has conditional formatting, defined names, activeX controls, shapes, formulas etc.
Well, I did what Ralph suggested and created a new excel file, then copied everything from the old workbook to the new one. Now it works fine. Apparently that was my only way out, the file was probably corrupted in some way.
I am using Excel 2010 and am having difficulty with one old workbook created in Excel 2003. Lots of symptoms to report!
No other workbooks are giving me this problem. This problem file usually causes "MS Excel - (workbook name.xls) [Compatibility Mode] (Not responding) and a blank screen apart from the task bar and this Excel message on a single line across the top of the screen. Waiting doesn't solve the problem. If I close Excel and choose the "Close program" option, it sometimes shows me the file as I remember it for a couple of seconds, then the program closes. Re-opening the file just gives the same behaviour again. During the first few seconds of loading, I can see the message "Contacting server for information" at the bottom of the Excel screen.
In Task Manager I can find EXCEL.EXE *32 running. I'm using Windows 7 Pro 64 bit.
This is a file I use regularly in projects as a specialised calculator, and so I re-copy it each time and save it to save the calculation records in the project file. I've found that versions of the workbook created even several years ago and have given no trouble until now all suffer this problem, so it looks like a problem with Excel 2010. This is the first time I've tried to open these files since migrating from a Win XP computer running Excel 2003.
Please can anyone help me to open the file and to resolve the problem?
Thanks
There might be a calculation or a marcro activated on start up that messes things up.
Try the following:
Open the Excel application, with a blank workbook. Set calculation to manual. Now look up your Macro settings and set these to "disable with notifications".
With these things set, open your misbehaving workbook again and see what happens now. Dont let the macros (if any) start yet! Open the VBA Editor window and check for a script in Workbook called Workbook_Open. If that is present check its content or put a break in and debug it.
Let us know what you find, if any.
UPDATE:
It sounds like there is a database link to an external source that is trying to refresh on startup but isnt working correctly (anymore). I now remember likewise behaviour when I had an Excel workbook with tons of SQL queries in it that (in case of showing a complete table or view by applying SELECT * FROM ...) could overlap other data and that would create autoshutdowns for me. Change the option in the Trust Center for External Content to Disable when you open this workbook and let us know!
I have a client with the same issue. The problem was resolved by removing all the logo's (Images) from the sheet. It appears that the logo contains a link to some web site. I copied the logo into paint and copied it back.
Problem Solved!
It appears that an object placed in the sheet can have its own links embedded in it???
I hope this helps!