CNET's Forum on Windows legacy operating systems, (XP, 2000/NT, ME, & Windows 95/98) is the best source for finding help or getting troubleshooting advice from a community of experts.
When i try and run a simple sort command on my mac using excel i get 'not enough memory' - i have just - Answered by a verified Microsoft Office Technician We use cookies to give you the best possible experience on our website.
I Can't Open Word Because There Is Not Enough Memory or Disk Space to Run Word. The other Office suite including Excel and PowerPoint have the same issues.'
I'm seeing issues with Excel attachments in Outlook 2013; Trying to preview in Outlook gives error:
The file cannot be previewed because of an error with the following previewer:
Microsoft Excel previewer
To open this file in its own program, double-click it.
And when following that advice, I get error:
Microsoft Excel cannot open or save any more documents because there is not enough available memory or disk space.
To make more memory available, close workbooks or programs you no longer need.
To free disk space, delete files you no longer need from the disk you are saving to.
Task manager reports 4.9Gb free RAM (although its only the x86 version of Office); Explorer reports 55.5Gb free disk space; Perfmon reports Excel as only using 45Mb (private bytes), and the Excel file (generated by Reporting Services 2008) is only 56Kb, with , so I have reason to believe the error message is erroneous.
I've already tried a 'repair' of Office, with no effect, and have also confirmed the program associations at Control PanelAll Control Panel ItemsDefault ProgramsSet Default ProgramsSet Program Associations
What might be causing this, and short of a complete rebuild of the PC, is there anything I've missed that I can try to fix the issue with?
EDIT: Doing some further diagnosis, I've taken a 'working' Excel document, emailed it to myself, and saved it into the same folder (with a subtly different name). The two files are binary identical, however the one that has been through Outlook is 'Blocked' - unblocking it through the properties page makes it work.
Now, this makes me suspect that 'some security setting' has been changed, but where would I change this setting (that I don't know what it might be called)?
In Excel, go to File/Options/Trust Center/Trust Center Settings/Protected View. Untick the 'Enable Protected View for Outlook Attachments' - and all will be well.
Bear in mind, of course, that this option defaults to the safer 'make the user conciously decide that they really want to open the workbook' - so make sure you trust the source of any Excel files you're receiving.
Will AlberWill Alber
The issue is usually because the Windows Firewall service is not started. Protected View requires an active Windows Firewall.
The best way to help memory to be freed is to nullify large objects:
Also note that global variables remain allocated from one call to another, so if you don't need persistence you should either not use global variables or nullify them when you don't need them any longer.
However this won't help if:
you need the object after the procedure (obviously)
your object does not fit in memory
Microsoft Excel Not Enough Memory Error
Another possibility is to switch to a 64 bit version of Excel which should be able to use more RAM before crashing (32 bits versions are typically limited at around 1.3GB).
I've found a workaround. At first it seemed it would take up more time, but it actually makes everything work smoother and faster due to less swapping and more memory available. This is not a scientific approach and it needs some testing before it works.
In the code, make Excel save the workbook every now and then. I had to loop through a sheet with 360 000 lines and it choked badly. After every 10 000 I made the code save the workbook and now it works like a charm even on a 32-bit Excel.
If you start Task Manager at the same time you can see the memory utilization go down drastically after each save.
Arne LarssonArne Larsson
Answer is you can't explicitly but you should be freeing memory in your routines.
Some tips though to help memory
Make sure you set object to null before exiting your routine.
Ensure you call Close on objects if they require it.
Don't use global variables unless absolutely necessary
I would recommend checking the memory usage after performing the routine again and again you may have a memory leak.
If you operate on a large dataset, it is very possible that arrays will be used. For me creating a few arrays from 500 000 rows and 30 columns worksheet caused this error. I solved it simply by using the line below to get rid of array which is no longer necessary to me, before creating another one:
Also if only 2 columns out of 30 are used, it is a good idea to create two 1-column arrays instead of one with 30 columns. It doesn't affect speed, but there will be a difference in memory usage.
Found this thread looking for a solution to my problem. Mine required a different solution that I figured out that might be of use to others. My macro was deleting rows, shifting up, and copying rows to another worksheet. Memory usage was exploding to several gigs and causing 'out of memory' after processing around only 4000 records. What solved it for me?
application.screenupdating = false
Added that at the beginning of my code (be sure to make it true again, at the end)I knew that would make it run faster, which it did.. but had no idea about the memory thing.
After making this small change the memory usage didn't exceed 135 mb. Why did that work? No idea really. But it's worth a shot and might apply to you.
Stevetb77Stevetb77
I had a similar problem that I resolved myself.... I think it was partially my code hogging too much memory while too many 'big things'
in my application - the workbook goes out and grabs another departments 'daily report'.. and I extract out all the information our team needs (to minimize mistakes and data entry).
I pull in their sheets directly... but I hate the fact that they use Merged cells... which I get rid of (ie unmerge, then find the resulting blank cells, and fill with the values from above)
Not Enough Memory To Run Microsoft Excel
I made my problem go away by
a)unmerging only the 'used cells' - rather than merely attempting to do entire column... ie finding the last used row in the column, and unmerging only this range (there is literally 1000s of rows on each of the sheet I grab)
b) Knowing that the undo only looks after the last ~16 events... between each 'unmerge' - i put 15 events which clear out what is stored in the 'undo' to minimize the amount of memory held up (ie go to some cell with data in it.. and copy// paste special value... I was GUESSING that the accumulated sum of 30sheets each with 3 columns worth of data might be taxing memory set as side for undoing
Yes it doesn't allow for any chance of an Undo... but the entire purpose is to purge the old information and pull in the new time sensitive data for analysis so it wasn't an issue
Ms Excel Error Not Enough Memory
Sound corny - but my problem went away
MikeMike
Excel Not Enough Available Memory
Not the answer you're looking for? Browse other questions tagged excelvbamemory or ask your own question.