How to Fix Runtime Error 7

Attention Before you read this tutorial, I highly recommend you check out my resources page for access to the tools and services I use to not only maintain my system but also fix all my computer errors, by clicking here!

Runtime errors generally occur when certain processes or files that a particular application requires has either been deleted or corrupted.

Runtime error 7 is a relatively common error which pops up at random intervals while using your computer. It may appear with an “Out Of Memory” error message, and abruptly halt whatever application you are using at the time. Runtime error 7 occurs primarily as the result of an issue within the coding of the application. To summaries, it’s essentially the result of poorly designed software or a coding bug. Moreover, although the error message may say the issue is memory related, in most cases you will find that loss of memory has absolutely nothing to do with the error.

What Causes Runtime Error 7?

The most commonly associated error message that the end user will come face to face with, will appear something like the following:

Runtime Error 7: Out of Memory

Already touching briefly on the cause of this error, one of the main reasons why runtime error 7 occurs is because of the corruption of file FM20.dll. The FM20.dll file is used by Visual Basic for the purpose of encoding specific settings and functions within an application.

This file is used exclusively by Visual Basic, and will usually be the cause of an error due to it being unsupported by Visual Studio and other similar programming interfaces. Fortunately, it is possible for you to fix this file by carrying out a number of set instructions, which I will touch on later in this post.

Runtime error 7 may also occur due to corruption of the comctl32.ocx file.

Just like with the FM20.dll file, repairing the error is simply a matter of replacing the file with a working compatible version. A process which you may or may not find challenging, depending on your level of expertise.

How to Fix It

Fixing runtime error 7 in most cases has a lot to do with repairing the FM20.dll file. But as I’ve stated, it’s not the only file known to cause this particular error.

That said repairing this error can prove to be quite difficult, depending on the method you choose to adopt. Fortunately, there are much simpler solutions, which is why I recommend you try the solutions I’ve mentioned below in the order that they appear.

Remove File FM20.dll

If you’ve created an application using Visual Basic which has inadvertently led to the runtime error 7 every time you attempt to run it or any other application on your computer, then you should consider removing the FM20.dll file from your computer. The reason why you may want to do this is because the error is likely the result of a conflict.

A shared file like FM20.dll, designed to carry out various functions across multiple applications can sometimes become corrupted, resulting in the various error messages you are seeing. Thus, as a sort of workaround, you should consider removing the file altogether.

In order to do that, simply do the following:

1. First you will need to boot into your computer with full administrative rights.

2. Then press windows key + R, type cmd and click on OK.

open command prompt

3. Once Command Prompt loads up, type regsvr32 -u fm20.dll then hit the Enter key.

cmd -> type regsvr32 -u fm20.dll

Note: This will unregister file FM20.dll, once you have done that, you will be able to remove or delete the file from your computer.

4. Next, Press windows key + R, type C:\Windows\System32 into the Run Command box and click on OK.

run -> C:\Windows\System32 -> ok

5. When the System32 Folder opens, locate the FM20.dll file, then right click on it and select Delete.

system32 -> FM20.dll -> delete

Run a Registry Scan

Another common cause for runtime error 7 is issues within the Windows registry. The registry, if you don’t know what it is, is basically the central database, used for storing all the most important hardware and software settings, which the operating system will call upon whenever the end user attempts to run an application.

What often tends to happen is that data within the registry becomes corrupted due to constant writing and rewriting of data within it, this leads to degraded system performance and a plethora of different errors.

To fix this problem, you will need to run a full scan of your registry using a professional registry cleaning tool like RegCure Pro. This tool will thoroughly scan of your computer, finding and repairing damaged file references and registry keys, which should repair the error.

For access to RegCure Pro, please visit the following link: http://www.compuchenna.co.uk/go/regcurepro

Replace Comctl32.ocx File

Comctl32.ocx is an important Windows file that is used for controlling various components of Visual Basic. Unfortunately, this file is highly susceptible to corruption, leading to the runtime error 7 you’re experiencing now. One of the most effective ways to manually repair this error is to replace the comctl32.ocx file, in order to do that, simply do the following:

Note: The Comctl32.ocx file is only present on Windows XP systems.

1. First, follow steps 1 – 2 of Remove File FM20.dll.

2. Once Command Prompt is up and running, type regsvr32 -u comctl32.ocx then press the Enter key.

cmd -> type regsvr32 -u comctl32.ocx -> enter key

3. Once you have unregistered the Comctl32.ocx file, you can now delete it. In order to do that, press windows key + R, type C:\Windows\System32 then click on OK.

run -> C:\Windows\System32 -> ok

4. When the System32 Folder successfully loads, simply locate the Comctl32.ocx file, then right click on it and select Delete.

system32 -> Comctl32.ocx -> delete

Note: Once you have successfully removed the Comctl32.ocx file, you will need to replace it with a working version.

5. Now, using one of the many reputable download sites, download a working version of Comctl32.ocx for your operating system.

Note: Make sure you download the file from a reputable source and scan it (with a virus scanner) prior to copying it to your computer.

6. Then copy it to the C:\Windows\System32 folder.

system32 -> copy new Comctl32.ocx file

7. Once you have done that, open Command Prompt again, by pressing windows key + R, typing cmd and click on OK.

run -> cmd -> ok

8. When Command Prompt loads up, type regsvr32 Comctl32.ocx and press Enter.

cmd -> type regsvr32 Comctl32.ocx -> enter key

Run a Virus Scan

Antivirus programs (if you don’t already know what they are) are basically software tools designed to scan your computer and remove any and all malicious files that it finds. Once a virus gets onto your computer can infect important DLL files on your computer, corrupted these files, making them unreadable to the operating system.

To ensure that a virus is not what is causing the runtime error 7, you will need to run a thorough scan of your computer. To do this, you can either use your current solution (assuming you already have software on your computer) or you can use one of the recommended antivirus tools I have listed here.

Re-Install Windows

The last repair solution to runtime error 7 is to use reinstall Windows, as this method entails the re-installation of your entire operating system, finding corrupt and/or missing DLL files and replacing them with new working versions of the file. A reinstallation is not the best solution, as it has its drawbacks, but it’s usually adept at fixing corrupted files on your computer. In order to reinstall everything, you will need your Windows CD and registration information. If you have that, then check out my page on speeding up your computer, for step-by-step instructions.

If you don’t have your Windows CD (which is quite common nowadays), then you can attempt a PC reset, refresh or recovery, the method you choose is totally up to you. However, access to this feature is restricted to Windows 8/8.1/10 users.

The built in restoration feature eliminates the need for your Windows CD, which is crucial, considering that most systems today, come with their operating system pre-installed. Anyway, if that’s an option that interests you, then I recommend you check out my post on CRITICAL_PROCESS_DIED errors.

Are you looking for a way to repair all the errors on your computer?
regcure pro image

If the answer is Yes, then I highly recommend you check out RegCure Pro.

Which is the leading registry cleaner program online that is able to cure your system from a number of different ailments such as Windows Installer Errors, Runtime Errors, Malicious Software, Spyware, System Freezing, Active Malware, Blue Screen of Death Errors, Rundll Errors, Slow Erratic Computer Performance, ActiveX Errors and much more. Click here to check it out NOW!

RECOMMENDED: Click here to fix your Windows errors and optimize system performance
¤