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.
Related
I have a workbook in which I consolidate data from various CSV files. There are a number of macros in this file including ones to add new sheets to the file, which is on a shortcut key Ctrl+Shift+N. This has been working perfectly for many years. This morning the shortcut key does absolutely nothing. If I go to the Excel developer tab and click on the Macros button, the list of macros is empty. However, if I open VBA I can run the macro from there and it still works perfectly.
I run Office Professional Plus 2019 and it ran an update yesterday. Does anyone know of a new setting introduced that may hide the macros in Excel itself. Note that macros are enabled on this workbook.
Just for closure should someone else stumble across this. The problem was related to the specific file. It somehow got "partially" corrupted. Still worked and could fire macros from VBA IDE as well as linked buttons, just not with shortcut keys as macros not "visible" in Excel view. File degraded further to a point where it could no longer save.
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.
My employer has recently upgraded from
Excel 2013 (15.0.4805.1001)
MSO (15.0.4919.1002) 32-bit to Excel for Office 365 MSO (16.0.11328.20362) 32-bit
There are no active add-ins (other than referred to below when loaded).
An Excel add-in (xlam) that I have created no longer functions correctly.
The add-in works with an open workbook and formats a lot of 'raw' data as tables (listobjects) and creates a number of PivotTables and Charts in a dashboard-style layout. During the process some blank sheets are copied from the add-in to the open workbook, and renamed as required.
For the most part, everything works fine (pivots created, dashboard created). At the end of the process I create an index sheet by copying a blank sheet from the add-in, and re-naming it (as ...Index). This is where things go wrong. Excel just seemed to 'hang'. On investigation I discovered that the sheet was not being renamed (so further processing stopped).
Delving into this further with error-trapping turned off, if I try to rename the sheet using the immediate window, I get
run-time error 7 Out of Memory
Further, if I manually rename the sheet (Excel interface) and then set the code running from that point, I've discovered that I can't use the CurrentRegion property (some sorting is done on the newly inserted sheet). Any attempt to use CurrentRegion results in
Unable to get the CurrentRegion property of the Range Class
This also applies to using the immediate window on ANY open workbook (e.g. ?Activesheet.range("A1").CurrentRegion.Rows.Count)
These errors persist during the current session of Excel (that is, I can create a blank workbook and try to rename a sheet using VBA but get an error; manually renaming a tab is OK). If I restart Excel everything is fine.
I require to use some global/public variables but (given that everything worked in Excel 2013) can't see that these would be the problem.
Any ideas?
After a further couple of hours looking into this, I established that the error was related in some way to a module which added slicers to the dashboard. The slicers were, in fact added (and stepping through the code no errors were generated).
Adding the slicers in a slightly different fashion appears to have got around the problem, although I am still none the wiser as to why it actually occurred in the first place (the original code for the slicers worked fine in Excel 2013).
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
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!