Runtime Error 7: Out of Memory [Fix]

Get rid of your temporary files to create space

by Claire Moraa
Claire Moraa
Claire Moraa
Author
Claire likes to think she's got a knack for solving problems and improving the quality of life for those around her. Driven by the forces of rationality, curiosity,... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • Runtime error 7 out of memory message indicates that your computer is out of memory.
  • This can occur when you have a large number of programs running at the same time or when you have too many files open. 
  • The first thing to do is to close some programs or quit those that are open in the background.
XINSTALL BY CLICKING THE DOWNLOAD FILE
Easily get rid of Windows errors Fortect is a system repair tool that can scan your complete system for damaged or missing OS files and replace them with working versions from its repository automatically. Boost your PC performance in three easy steps:
  1. Download and Install Fortect on your PC.
  2. Launch the tool and Start scanning
  3. Right-click on Repair, and fix it within a few minutes
  • 0 readers have already downloaded Fortect so far this month

Runtime error 7 out of memory is a common error every programmer faces at least once in a lifetime. Other computer users are also not exempt from this error, as it appeared when using Microsoft Excel.

If you’re working on large projects using too much memory, you might get this error. A run repair tool should suffice but even such require memory to be installed and this is clearly a memory issue. If a repair tool is out of the picture, find out other ways to deal with this error.

What is the run time error 7 in Excel?

Run time error 7 is common in Excel. It occurs when the program runs out of memory. This can happen if you are working with a very large spreadsheet or have many spreadsheets open simultaneously.

It may also occur when you try to run a macro you have written, but when you execute it, it fails because your system lacks sufficient resources.

Other reasons you may encounter the runtime error 7 out of memory include:

  • Corrupt file – Sometimes, when you open an Excel file, it may not open properly because it has become corrupt for some reason.
  • Insufficient memory – Your computer needs enough space to store files and ensure that all applications run smoothly without interruptions or crashes due to insufficient memory resources.
  • Compatibility issues – Another common cause of this error is an incompatibility between the version of Excel you are using and the version of the file you are trying to open.
  • Unexpected closure of a workbook – You may also get this error if you close an Excel workbook without saving changes. When this happens, Excel tries to run the macro using objects that no longer exist.
  • Memory leak – A memory leak occurs when a program allocates memory from the system and fails to free or reuse it. If you have an Excel file with a large number of formulas and functions, it’s possible that there is a memory leak.
  • Software conflict – Another possible cause of run time error 7 is a conflict with other programs installed on your computer.
  • Hardware failure –  The problem may also be caused by an issue with your computer’s hardware. Your CPU might be failing and causing this error.

How can I fix the runtime error 7 out of memory?

Expert tip:

SPONSORED

Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

Start off with these basic workarounds before jumping onto the heavy hitters:

1. Defragment your hard disk drive

  1. Right-click on the Start Menu to bring up the shortcut menu, then select Windows Terminal (Admin).
  2. Type the following command, then hit Enter to analyze your drive. Remember to replace X with the letter of your drive: defrag X: /a
  3. After the scan is finished, you’ll see information about your hard drive, including the fragmentation level and a note saying whether you need to defragment your drive or not.
  4. Now enter the following command to defrag that drive: defrag X:
  5. Wait for the process to finish.

2. Increase Virtual Memory

  1. Hit the Search icon on the Taskbar, type View advanced system settings in the text field at the top, and click on the relevant search result that appears.View advanced system settings to increase virtual memory windows 11
  2. In the Advanced tab, click on the Settings button under Performance.Settings advanced
  3. Navigate to the Advanced tab in the Performance Options window.Advanced to increase virtual memory in Windows 11
  4. Next, click on Change under Virtual memory.Change virtual memory
  5. Untick the checkbox for Automatically manage paging file size for all drives.Untick checkbox to to increase virtual memory in Windows 11
  6. If Windows was managing the virtual memory earlier, it’s best to clear the previously set value and then increase it.
  7. To do that, click on the drive with System managed listed, select No paging file, and click on Set.No paging file
  8. Click Yes on the confirmation prompt that pops up.Click Yes
  9. Now, choose a drive or partition from the list, select the Custom size option and enter the same value under Initial size and Maximum size fields in MB (1GB=1024MB), taking cue from the previous section.Enter values to to increase virtual memory in Windows 11
  10. Once done, click on Set and then on OK at the bottom to save the changes.Click Set to to increase virtual memory in Windows 11
  11. Next, restart the computer for the changes to come into effect.

Should the above steps fail to yield the expected results for runtime error 7 out of memory, the next step would be to upgrade your RAM.

But before you’re quick to get a new one, do your due diligence first. Sometimes, you may find that Windows is not using all RAM or even with two RAM sticks, only one RAM slot is working.

Exhaust all avenues before replacing any components of your PC. We all know nothing comes cheap.

That’s it for this article, but if you have any other solution worth mentioning, let us know in the comment section below.

Still experiencing issues?

SPONSORED

If the above suggestions have not solved your problem, your computer may experience more severe Windows troubles. We suggest choosing an all-in-one solution like Fortect to fix problems efficiently. After installation, just click the View&Fix button and then press Start Repair.

This article covers:Topics: