How to Fix Object Variable not Set Error 91 in Excel
Oct 23, 2026 • Filed to: Recover Files • Proven solutions
Resolve Excel Run-time Error 91 by configuring the DCOMCnfg.exe file permissions, clearing outdated System Registry references, or using Stellar Phoenix Excel Repair to recover corrupted spreadsheets.
● Manually fix system-wide security conflicts by setting the DCOMCnfg.exe file to allow "Everyone" to run, or uninstall and reinstall the specific application triggering the crash.
● For errors originating in Visual Basic or .xlsm files, verify that all VBA macro variables are properly initialized and eliminate any conflicting Office add-ins.
● The Stellar Phoenix Excel Repair recovery method is strictly limited to XLS and XLSX file formats across MS Excel versions 2000 through 2016 on Windows and Mac platforms.
Ask AI for a summary
If you are an office worker, you must have used Microsoft Excel at some point in your career. It is one of the best spreadsheet software in the world. Having some extraordinary features to offer to its users, MS Excel has become the preferred choice of people all over the world for tasks like data manipulation and sorting. Excel files contain a great amount of data. Several items can be added nowadays to excel files. For instance, you can add tables, charts, and texts among other items in your excel file. These tools offer users the chance to perform data analysis in MS Excel as well. XLS and XLSX are the two most popular file extensions that are currently in use for Excel files.
MS Excel can display error messages if it encounters a problem during its operation. Runtime error 91 is one of the error messages that this software is known to issue from time to time. The full form of this Excel error message is, 'Run-time Error '91': Object Variable or With Block Variable not Set'. One of the reasons for the generation of this error message is the corruption of the file titled, 'DCOMCnfg.exe'. The corruption of this file can result due to various factors.
- There might be an issue with the operating system.
- The MS Excel software is having some problems, which are causing it to crash and corrupt this file.
- A virus or bug might be present on the PC which is corrupting this file.
- A sudden power failure occurs which caused this file to close unexpectedly and in the process ended up corrupting it.
Part 1: Free Download The Best Excel Repair Tool
Runtime errors of any type are quite frustrating to deal with. The Excel file runtime error 91 is no different. Still, you can fix the object variable not set error 91. The only problem is finding an excel repair tool capable enough to perform this task effectively. Stellar Phoenix Excel Repair can fix object variable not set error 91 without encountering any difficulties whatsoever.

- Recovers all kinds of data stored in damaged excel files such as tables, charts, formulas, comments, images, etc.
- Restore all of your corrupted excel files to their original standing.
- Preview the repaired excel file in real-time, see how much of the file has been recovered as it is being repaired.
- All kinds of MS office corruption errors (for XLS and XLSX files only) can be handled with this tool.
- This excel file repair tool can be used on both Windows and Mac platforms to repair corrupt excel file.
- All kinds of MS office corruption errors (for XLS and XLSX files only) can be handled with this tool.
- This excel file repair tool can repair damaged files of all versions from 2000 to 2016 that includes 2000, 2003, 2007, 2010, 2013, etc.
Part 2: How to Fix Excel File Runtime Error 91
Here is an instruction guide that has been formulated to offer you the chance to see how Stellar Phoenix Excel Repair can be used to fix object variable not set error 91.
Step 1 To searching corrupt Excel file from local drive, by clicking the 'Search Files', 'Select Folder' or 'Select File' buttons.

Step 2 Select the corrupt Excel file from the searched section to click the "Scan" button to start the repairing process.

Step 3 Click on the file present in the family tree towards your left to preview the repaired excel file

Step 4 Select a preferred location to save your repaired Excel files.

If you want to put an end to your excel file corruption woes then prevention is perhaps the best available solution for you. The following tips would be quite beneficial to you in this regard.
- Always remember that updating the operating system as and when its updates become available is of prime importance. It ensures that the operating system does not develop issues that can lead to excel file corruption.
- Similarly, updating the anti-virus program that you have installed on your system is crucial for the safety of your excel files too. So, make sure you update as frequently as possible.
- Investing in a backup power option is essential too. It ensures that your PC does not shut down in the event of a sudden power failure and the excel files remain safe from corruption.
To conclude, Stellar Phoenix Excel Repair is the only option you have got if you want to effectively fix object variable not set error 91. It is the best excel repair tool that can get this job done safely.
People Also Ask
-
How do You Fix Object Variables not Set?
Fix the "Object variables not set" error by checking if there are any conflicts between add-ins and Office. Go to "System Registry" and erase outdated references from it. You can also repair Excel to fix the error.
-
How do I Fix Runtime Error 91 in Excel?
The app that seems to be causing this error should be uninstalled and reinstalled. Do an update of your Windows OS. Now, set the DCOMCnfg.exe file in such a way that it will allow "Everyone" to run.
-
What is Object Variable or with Block Variable Not Set Error?
This error occurs in the Visual Basic program. It can originate from a Palisade code, in Excel, or from the macros you have if your file is .xlsm. This error message indicates that the VBA code made use of a variable without properly initializing it.
-
What is Run Time Error 91?
This type of Runtime Error has the likelihood of occurring in all the Windows versions. The main file involved in this error is the DCOMCnfg.exe file. This file is used to set security settings on a system-wide basis. Corruption to this file leads to the error.
Recover & Repair Files
- Recover Document Files
- Repair Document Files
- Recover & Repair More
- Restore Corrupted Files
- Recover a Folder
- 0 Byte Files Solution
- Undeleted Recycle Bin
- Recover Folder on Windows
- Retrieve Lost Files
- Shift Deleted Files
- Clear & Delete File
Recoverit Editorial Team
chief Editor