Are you getting the Runtime Error 91 when trying to open a program? Is the DCOMCnfg.exe Runtime Error showing while launching the Excel program? Here’s good news for you. In this post, we will discuss everything about this error and share possible solutions to fix it.
What Is Runtime Error 91 on Windows?
The Runtime Error 91 is an error code that shows on all Windows operating systems. It’s a common error that is accompanied by the message, “Object variable or with block variable not set. The main culprit behind this issue is a faulty DCOMCnfg.exe file, but there could also be other triggers.
What Causes Runtime Error 91?
If you are asking, “Why Windows is getting Runtime Error 91?” Well, there are many possible causes.
Runtime Error 91 usually shows when you are trying to launch or use a program that has inconsistent codes or corrupt files. The likes of a virus infection, registry problems, and missing DLLs can also trigger it to show. But specifically, it’s a problem with the DCOMCnfg.exe file on your system. It’s preventing your system from loading the files that are required to run a program.
Pro Tip: Scan your PC for performance issues, junk files, harmful apps, and security threats
that can cause system issues or slow performance.
8 Ways to Resolve Runtime Error 91 on Windows
If you’re getting the Runtime Error 91 while trying to open a program on your Windows device, here are the solutions you may try:
Solution #1: Reinstall the faulty program
It is possible that you are getting the Runtime Error 91 due to file corruption. And to fix corrupted data within your system files, you may use the System File Checker utility to run a quick scan. Take note, though, that this method does not work if the corrupted files do not belong to any inbuilt Windows program.
If an external program or a third-party application is the one that has problematic or corrupted files, you may need to reinstall it. Here’s how:
- Into the Windows search field, input control panel and hit Enter.
- Next, go to Programs and select Uninstall a Program.
- From the list, right-click on the problematic app and select Uninstall.
- Once done, reinstall the application and check if the Runtime Error 91 still shows.
Solution #2: Install Windows Updates
If the problem is related to Visual Basic and the .NET Framework, then installing any Windows Updates may resolve it. So, make sure Windows is up to date by following these steps:
- Right-click on the Start button and go to Settings.
- Choose Update and Security.
- Click the Check for Updates button.
- Wait as Windows downloads and installs the updates.
- Once the update is completed, restart your PC to apply the changes.
Solution #3: Perform a thorough malware scan
Now, if you suspect that malware is causing the Runtime Error 91, perform a malware scan. To do so, you will need to use a trusted anti-malware software program.
There are many paid and free antivirus solutions available online, but when making a choice, consider your needs. However, if you are not sure what to download, you may use the inbuilt Windows Defender to perform a complete system scan and ensure no malware entities hide in your system.
To perform a system scan using Windows Defender, do the following:
- Click on the Windows Security icon on the system tray.
- Choose Virus and threat protection.
- Select Scan options and click Full Scan.
- Hit the Scan Now button.
Solution #4: Change the settings of the DCOMCnfg.exe file
It is also possible that the Runtime Error 91 is caused by incorrect configurations of the DCOMCnfg.exe file. Here’s how to change its settings:
- Into the search bar, input DCOMCnfg.exe and hit Enter.
- In the Window that pops up, expand Component Services and go to Computers.
- Right-click on My Computer and select Properties.
- Navigate to Access Permissions and go to the COM Security tab.
- Select Edit Limits.
- Choose Everyone and be sure that the Remote and Local options are both set to Allow.
Solution #5: Grant full control to the FRxXMLTag.XML file
If the Runtime Error 91 is followed by the Error 5999, do the following:
- Run Windows as administrator.
- In the Windows Explorer, find the FRx directory.
- Right-click on the XML file and choose Properties.
- Go to the Security tab.
- Add Everyone as a group and choose Full Control.
- Hit OK.
Solution #6: Clean the registry
The registry is Windows’ database. It stores all the options, configurations, and settings that your computer needs to run. It’s more like a library of your PC. If you run a program, the registry is read a lot of times to recall all the information and settings that are required by the program to run. But since there are plenty of files that need to be checked, the registry becomes prone to becoming corrupted and damaged. When this happens, the Runtime Error 91 may surface.
To fix this issue, you may need to use a trusted registry cleaner. But make sure you download from reputable sources only.
Solution #7: Update your device drivers
It may be your motherboard or graphics driver that is interfering with the program and causing the Runtime Error 91. So, make sure your device drivers are all up to date. Download the most recent drivers for your device from the official manufacturer’s website or use a third-party device driver updater tool.
Solution #8: Reboot your PC
This may seem pretty basic, but this solution has worked for many Windows users. Restarting your system can resolve the common runtime errors like Runtime Error 91. Here’s how to give your PC a good reboot:
- Click on the Start menu and go to the Power icon.
- Select Restart.
- Once your PC has completely rebooted, check if the Runtime Error 91 still exists.
Runtime Error 91 may be common and can cause serious problems to Windows users. However, it can be fixed for good. You may reinstall the program where the error code shows or install any pending Windows update. If it doesn’t work, then change the settings of certain files. Now, if you think the problem is more serious than it looks, ask help from Windows professionals.
What other solutions do you know to resolve the Runtime Error 91? Share them with us below!