Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel 2013 crashing, due to memory fragmentation

Tags:

excel

vba

Since upgrading our users from Excel 2007 to 32-bit Excel 2013, our company has faced a mountain of performance and stability issues.

We've had to disable hardware acceleration for some users, change settings in Control Panel\Ease of access center, and even upgrade Intel Graphics drivers to improve stability, all with varying levels of success.

But one issue we can't get around is this:

The 32-bit version of Excel 2013 appears to use its own memory manager to map from 32-bit memory to the 64-bit memory used by Windows 7.

The problem is, when this memory becomes too fragmented, Excel 2013 will completely crash.

Sometimes, after just an hour of useage, we have seen Excel 2013 attempt to search for a block of XX'Mb of memory, and if it can't find a contiguous block of memory of this size, it'll crash.

As a financial company, we have a lot of legacy VBA code in these Excel files, and moving to 64-bit Excel 2013 would introduce even more problems.

So does anyone have any idea how to fix the memory problems with Excel 2013..?

Update

Some readers have (understandably) asked why we haven't just installed the 64-bit version of Excel 2013, particularly as we're running 64-bit Windows 7.

The reason, to quote Microsoft, is compatibility.

64-bit editions of Office 2013

"We recommend the 32-bit version of Office for most users, because it's more compatible with most other applications, especially third-party add-ins. This is why the 32-bit version of Office 2013 is installed by default, even on 64-bit Windows operating systems."

Our users don't want bells, whistles or funky animations. They want something which is stable, even with their Excel files and VBA which was written 10 years ago. Some of this code even uses FORTRAN .dll calculation engines, DAO libraries, etc.

And from an IT support point of view, we just want a version of Excel which is still supported by Microsoft.

Which is why we're using 32-bit Excel 2013 for now.

The question is, this is a nasty issue with 32-bit Excel 2013, most financial companies still heavily supply on legacy Excel/Access apps... what can we do to get this environment more stable ?

like image 251
Mike Gledhill Avatar asked Nov 26 '15 13:11

Mike Gledhill


1 Answers

I have also faced this king of issue on my project, but as I have managed the code with doevents keyword and put proper memory managed code like at the end of function and procedures , clear the variables and after that put doevents so it will be 90 % less crash.

like image 59
Divyesh M. Avatar answered Oct 25 '22 11:10

Divyesh M.