Fixed Were Sorry But Excel Has Run into an Error | Stellar

Fixed Were Sorry But Excel Has Run into an Error | Stellar

Nova Lv12

How to Fix Excel Run Time Error 1004

Summary: Run-time errors are windows-specific issues that occur while the program is running. This blog will teach you how to fix Excel run-time error 1004. In addition, you’ll learn about an Excel repair tool that can help fix the error 1004 if it occurs due to corruption in Excel files.

Free Download for Windows

VBA (Microsoft Visual Basic for Application) is an internal programming language in Microsoft Excel. Sometimes, when users try to run VBA or generate a Macro in Excel, the Run-time error 1004 may occur. This error may occur due to the presence of more legend entries in the chart, file conflict, incorrect Macro name, and corrupt Excel files. In this blog, we have discussed the reasons and shared some solutions to resolve run-time error 1004.

Why This Error Occurs?

The run time error 1004 usually occurs when you run a VBA macro with the Legend Entries method to modify the legend entries in the MS Excel chart. It happens when the chart contains more legend entries than the available space, macro name conflicts, corrupt Excel files, or data-types mismatch in the VBA code.

Ways to Fix Excel Run-Time Error 1004?

Try the below workarounds to fix Excel run-time error 1004:

Create a Macro to Reduce Chart Legend Font Size

Sometimes, Excel throws the run-time error when you try to run VBA macro to change the legend entries in a Microsoft Excel chart. This error usually occurs when Microsoft Excel truncates the legend entries because of the more legend entries and less space availability. To fix this, try to create a macro that shrinks/minimize the font size of the Excel chart legend text before the VBA macro, and then restore the font size of the chart legend. Here is the macro code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
VBCopy
Sub ResizeLegendEntries()

With Worksheets("Sheet1").ChartObjects(1).Activate
' Store the current font size
fntSZ = ActiveChart.Legend.Font.Size

'Temporarily change the font size.
ActiveChart.Legend.Font.Size = 2

'Place your LegendEntries macro code here to make
'the changes that you want to the chart legend.

' Restore the font size.
ActiveChart.Legend.Font.Size = fntSZ
End With

End Sub
Note: Make sure you have an Excel chart to run the code on the worksheet.

Uninstall Microsoft Work

You may encounter a run-time error 1004 in Excel version 2009 or older versions due to conflicts between Microsoft works and Microsoft Excel. This error usually occurs if your system has both Microsoft Office and Microsoft Works. Uninstalling one of them will fix the issue. Try the below steps to uninstall Microsoft Work:

  • First, open the Task Manager using the shortcut CTRL + ALT + DEL altogether
  • The Task Manager window is displayed.

Task Manager Window

  • Click the Process tab, right-click on each program you want to close, and then click End Task.
  • Stop all the running programs.
  • Open the Run window and type appwiz.cpl to open the Programs and Feature window.

Program and Features of Control Panel

  • Search for Microsoft Works and click Uninstall.

Try Deleting GWXL97.Xla File

The Add-ins files with .xla extension in MS-EXCEL is used to provide additional functionality to Excel spreadsheets. Sometimes, deleting the GWXL97.XLA file fixes the run-time error. Here are the steps to delete this file:

  • Make sure you have an Admins rights, open the Windows Explorer
  • Follow the Path C:\Programs Files\MSOffice\Office\XLSTART.
  • Find and right-click on the GWXL97.XLA file
  • Click Delete.

Change Trust Center Settings

Sometimes, run-time errors might arise because of incorrect security settings. The Trust Center settings help you find the Privacy and security settings for Microsoft Excel. Follow the below steps to change the Trust center settings:

  • Open Microsoft Excel.
  • Go to File > Options.
  • The Excel options window is displayed.
  • Choose Trust Center, and click Trust Center Settings.
  • Tap on the Macro Settings tab, and select Trust access to the VBA project object model.

Macro Settings in Microsoft Excel

  • Click OK.

Run Open and Repair Tool

The Runtime error also arises when MS Excel detects a corrupted worksheet. It automatically begins the File recovery mode and starts repairing it. However, if the Recovery mode fails to start, use the Open and Repair tool with the below steps:

  • Click File > Open.
  • Click the location and folder with a corrupted workbook.
  • In the Open dialog box, choose the corrupted workbook.
  • Click the arrow next to the Open tab, and go to the Open and Repair tab.
  • Click Repair.

You can also opt for Stellar Repair for Excel if the Microsoft Excel’s built-in tool cannot fix the error.

Use Stellar Repair for Excel

Stellar Repair for Excel is a professional software for repairing damage. xls, .xlsx, .xltm, .xltx, and .xlsm files and recovering all its objects. Here are the steps to fix the error using this tool:

  • First, download, install, and run Stellar Repair for Excel.
  • Click the Browse tab on the interface window to choose the corrupted Excel file you need to repair.
  • Click Scan. You will see the scan progress in the scanning window.
  • Click OK.
  • The tool can let you preview all the recoverable Excel file components including tables, pivot tables, charts, formulas, etc.
  • Click Save to save the repaired file.
  • Save File dialog box will appear with the below two options:
  • Default location
  • New location
  • Choose a suitable option.
  • Click the Save option to repair the Excel file that you have chosen.
  • Once the repair is complete, it will display a message “File repaired successfully.”
  • Click OK.

Conclusion

Now you know the Excel run-time error 1004, its cause, and solutions. Follow the workarounds discussed in the blog to rectify the error quickly. However, Stellar Repair for Excel makes your task of removing run-time errors easy. It’s a powerful software to fix all the issues with Excel files. Also, it helps in extracting data from the damaged file and saves it to a new Excel workbook.

[Fixed] Excel Found a Problem with One or more Formula

Summary: The error ‘Excel found a problem with one or more formula references in this worksheet’ may appear while saving the Excel workbook. It occurs when Excel found a problem with the formula used in the sheet. However, it may also occur when the Excel workbook gets damaged or corrupt. In this guide, we’ve explained the reasons that may lead to this Excel error and methods to resolve the error, by using various Excel options and a third-party Excel file repair software.

Free Download for Windows

If you are experiencing the ‘Excel found a problem with one or more formula references in this worksheet’ error message in the Excel workbook, it indicates that the Excel file is corrupt or partially damaged. However, it may also occur due to incorrect reference to a wrong cell or object linking, which is not working. The complete error message says,

‘Excel found a problem with one or more formula references in this worksheet. Check that the cell references, range names, defined names, and links to other workbooks in your formulas are all correct.’

Excel found a problem with one or more formula references

In any case, resolving the error is critical as it doesn’t let you save the file and may result in loss of information from the Excel workbook.

Reasons for Excel Formula References Error

A few reasons that may lead to such error are as follows,

  • Wrong formula or reference cell
  • Incorrect object linking or link embedding OLE
  • Empty or no values in named or range cells
  • Multiple Excel files (not common)

Methods to Resolve ‘Excel Found a Problem with One or More Formula References in this Worksheet’ Error

Following are a few methods that you can follow to fix Excel file that can’t be saved due to problems with one or more formula references in the worksheet.

Method 1: Check Formulas

If the problem has occurred in a large Excel workbook with multiple sheets, it’s quite hard to pinpoint the problem cell. In such cases, you can use the Error Checking option that runs a scan and checks for a problem with formulas used in the worksheet.

To run Error Checking in the Excel sheet, follow these steps,

  • Go to Formulas and click on the ‘Error Checking’ button

Error Checking

  • This runs a scan on the sheet and displays the issues, if any. If no issue is found, it displays the following message,

The error check is completed for the entire sheet.

In such a case, you can try saving the Excel file again. If the error message persists, proceed to the next method.

Method 2: Check Individual Sheet

The problem may also occur due to an issue with one of the sheets in the workbook. To find the faulty sheet and fix the problem, you can copy each sheet content in a new Excel file and then try to save the Excel file.

This will help you find the faulty sheet from the workbook that you can review. This method makes the entire process of troubleshooting Excel formula reference error quite easy and convenient.

In case the error is not fixed, you can back up the faulty sheet content and remove it from the workbook to save the Excel file.

When the Excel file contains external links with errors, MS Excel may display such error messages. To check and confirm if external links are causing the error, follow these steps,

  • Navigate to Data Tab > Queries & Connections > Edit Links
  • Check the links. If you find any faulty link, remove it and then save the sheet

Method 4: Review Charts

You can review the charts to check if they are causing the formula reference error in Excel. It may take a while based on the size of the Excel file. Sometimes, it’s not practically possible to track down which Excel chart object is causing the error. Thus, you need to check specific locations, such as:

  1. Check horizontal axis formula inside Select Data Source dialog box
  2. Check Secondary Axis
  3. Check linked Data Labels, Axis Labels, or Chart Title

Method 5: Check Pivot Tables

To check Pivot Tables, follow these steps,

  • Navigate to PivotTable Tools > Analyze > Change Data Source > Change Data Source…

Edit links

  • Check if any of the formula used is problematic. Sometimes small typo, such as misplaced comma, can lead to such problems in Excel. Thus, check each formula thoroughly and correct the formulas wherever needed.

Method 6: Use Excel Repair Software

When none of the methods resolve the error, then you can rely on advanced Excel repair software , such as Stellar Repair for Excel. It’s a powerful tool that is recommended by several MVPs and IT administrators for resolving common Excel errors, such as ‘Excel found a problem with one or more formula references in this worksheet.’

Stellar Repair for Excel

It repairs corrupt or damaged Excel (.xls/.xlsx) files, recovers Pivot tables, charts, etc., and save them in a new Excel worksheet. It helps Excel users, facing formula reference error, restore their Excel file without any risk of data loss, while preserving the sheet properties and formatting with 100% precision.

Conclusion

Although the error ‘Excel found a problem with one or more formula references in this worksheet’ can be resolved by using various options in MS Excel, it may lead to a partial loss of information. Thus, you must perform these operations after taking a backup of the Excel worksheet. Also, if the MS Excel options fail to resolve the problem, you can use an Excel file repair software, such as Stellar Repair for Excel. The software helps fix Excel file corruption and restores the information and data from corrupt or damaged Excel files (.xls/.xlsx) to a new worksheet.

Recover Corrupted Excel File 2007, 2010 | Easy Methods

There are several reasons that can cause Microsoft Excel workbooks to turn corrupt, such as virus attack, bad sectors on a drive on which Excel file is saved, system shutdown without properly closing the Excel application, etc.

Corruption in an Excel workbook can result in data loss or render the workbook inaccessible. Fortunately, Excel automatically starts recovery upon opening a corrupted Excel file. But, if it fails, you can manually repair the file or extract data from the corrupt file.

Quick Solution: Performing 2007, 2010 Excel repair or recovery process manually can be time-consuming. Also, manual workarounds to recover corrupt Excel workbook does not guarantee recovering the complete workbook data. Use Stellar Repair for Excel software to repair single or multiple Excel (XLS/XLSX) files in 3 simple steps. The software also helps recover the Excel file, keeping the data intact.

How to Fix Microsoft Excel 2010 & 2007 Files Corruption?

Microsoft Excel comes with an inbuilt repair utility, called ‘Open and Repair’, that helps fix and recover corrupted Excel files.

Steps to Repair MS Excel 2010 Files Manually

The detailed steps to open and repair Excel 2010 are as follows:

  • Open Microsoft Excel 2010 and click File from the main menu.

Microsoft Excel 2010 File Menu

  • Next, click Open.

Select Open Option

  • Browse the corrupt Excel 2010 file on your computer and select it in the Open dialog.

Browse Corrupt Excel 2010 File

  • Click the arrow next to the Open button and choose Open and Repair.

Select Open and Repair

  • Click Repair when prompted to recover data to the maximum.
  • If Excel fails to repair, click Extract Data to extract values and formulas in the corrupt file.
  • Excel prompts to ‘Convert to Values’ or ‘Recover Formulas’.
  • Click Yes if it prompts the following error:

“The document file name caused a serious error the last time it was opened. Would you like to continue opening it?

  • When Excel opens the last saved file, save it.

Once you’re able to access the last saved 2010 Excel file, try extracting the file contents.

Save Excel 2010 File in HTML Format

If you can open the Excel file, choose the HTML format to save it in filtered form. After that, close the Excel file as you have your data in the HTML file. The steps to save an Excel file in HTML format are as follows:

  • Open Microsoft Excel 2010, click Save As, and then choose Web Page in the ‘Save as’ type drop-down list.
  • Select the “Enable Entire Workbook” option, and then click the Save button.
  • Close the Excel file and reopen your Microsoft Excel application. Browse the HTML file that you have saved.
  • Click File from the main menu, and select Save As in the list.
  • Type-in a different name, choose Microsoft Excel Workbook in the ‘Save as’ type drop-down menu, and then click the Save button.

With this, you would be able to access the data in the corrupt Excel file.

If the inbuilt tool fails to repair Excel 2010 file, a few methods can help you recover data from corrupted or lost workbook manually.

Steps to Repair Excel 2007 Files Manually

Follow these steps to repair a corrupted 2007 Excel file by using the inbuilt Microsoft Excel repair tool:

  • Open Microsoft Excel 2007, click the Office button, and then select Open.

Open Microsoft Excel 2007 Main Menu

  • In the Open dialog box that pops-up, browse and select the corrupt Excel 2007 file. Click the arrow next to the Open button and choose Open and Repair.

Open and Repair Excel 2007 File

  • Click Repair when prompted to recover as much data as you can from Excel 2007 file.

Repair Excel 2007 File

  • If a repair fails, follow steps 1 till 3, and then click Extract Data to extract values and formulas from the corrupt file.
  • In the window that appears, click Convert to Values or Recover Formulas to extract workbook data.

Recover Excel 2007 File

Note: The built-in Microsoft Excel 2007 repair tool may fail to resolve Excel corruption issue. Also, choosing to extract data from the workbook involves data loss risk. Using a professional Excel repair tool, however, can resolve all types of Excel file corruption errors and restore all its data.

Methods to Recover Data from Corrupt Excel 2010 & 2007 Files

If the ‘Open and Repair’ feature fails in getting your Excel 2010, 2007 file repaired, you can try retrieving the file contents by following some manual methods. However, the methods may vary depending on whether you can open a workbook or not.

Method 1 – Move Corrupt Excel File to another System

Move the corrupt Excel file to any other computer and try opening it in MS Excel 2010/2007. Doing so, may help you resolves disk or network-related errors leading to Excel file corruption.

Method 2 – Revert Unsaved Excel File to its Last Saved Version

If an Excel file turns corrupt while working on it but before saving any changes, try reverting it to its last saved version. To do so, perform the following:

  • Open your Excel application, click the Office button, and then click Open from the menu.
  • Browse the corrupt Excel file, click Yes when prompted to revert to its last saved version.

What if Nothing Works?

If you fail to recover a corrupt Excel 2007/2010 file, perform Excel file recovery with Stellar Excel repair software. The software is specially designed to help users fix their corrupted XLS/XLSX files quickly and easily without any technical assistance. It also helps restore all the file data to its original form.

Free download Stellar Repair for Excel

Points to Remember

  • Close all the MS Excel instances before using the software
  • If the sheet you are repairing contains engineering formulas, please include ‘Analysis TooPak’ manually from Tools > Add-Ins

If you know the corrupt Excel 2007 or 2010 file location, click Browse to choose the file. Otherwise, click Search. Follow the below steps to recover data from corrupt Excel 2007/2010 file by using Stellar Excel repair tool:

Select Corrupt Excel File in Stellar Repair for Excel

  • Click the Repair button to scan the file.

Repair Excel File using Stellar Repair for Excel

  • Once the scanning process is complete, the software shows a preview of recoverable Excel file items.

Preview of Recoverable Excel File Items

  • To save the repaired file, click the Save File option on File menu.

Choose Save File

  • In ‘Save File’ dialog box, choose to recover Excel 2007 & 2010 data to either the Default or New location. Click OK.

File Saving Options

The repaired Excel file gets saved at the specified location.

Preventive Measures to Avoid Losing Excel File Data

The above-discussed methods might help salvage your data. But, it is recommended that you must take some preventive measures to avoid losing the data. One such important measure is backing up a copy of your workbook automatically. Doing so, will help you get back data in case the workbook is accidentally deleted or corrupted.

Steps to Create Backup Copy Automatically

You can automatically create an Excel backup copy by following these steps:

  • Click Save As from the main menu of your Excel application.
  • Browse to the location where the corrupt Excel 2010/2007 file is saved.

Browse the Excel File Location

  • In ‘Save As’ dialog box, click the arrow next to Tools button (given at the bottom left corner) and choose General Options.

Choose General Options

  • In ‘General Options’ box, check Always create backup checkbox, and then click OK.

Select Always Create Backup

With this, you instructed MS Excel to create a backup of every Excel file you create or open for work.

Conclusion

This article outlined the typical reasons resulting in a corrupt Excel 2010 or 2007 file, such as virus infection, bad sectors on drive, etc. It explained how to fix a corrupted Excel file by using the inbuilt MS ‘Open and Repair’ tool. The article also discussed methods to recover Excel files in MS Office 2010 & 2007 when the Microsoft Excel repair tool fails. Further, it explained how using a professional repair tool such as Stellar Repair for Excel can come in handy when the manual methods to repair and recover Excel 2007 and 2010 file fails. But, keep in mind, a workbook may get corrupt again. And so, make sure to automatically backup your workbook to avoid losing its data.

How to Fix “Errors were detected while saving Excel” Error?

When trying to save the Excel file, you might face unexpected errors. The “Errors were detected while saving Excel” is one such error. It can also occur when using VBA in Excel. The complete error message appears as:

**“Errors were detected while saving [file name]. Microsoft Excel may be able to save the file by removing or repairing some features. To make the repairs in a new file, click Continue. To cancel saving the file, click Cancel.”
**

The error can occur if the features (Pivot tables, charts, macros) used in the Excel file get corrupted . However, there could be several other reasons behind the occurrence of the error. Let’s discuss them.

What Causes the “Errors were detected while saving Excel” Error?

There are various reasons why you encounter this error. Here are some of them:

  • Incompatible pivot table in the Excel file
  • Large or uncompressed images in the Excel file
  • File-sharing properties are not allowing file saving
  • Excel file is corrupted
  • Large-sized Excel file
  • File version incompatibility
  • VBA code is corrupted

Ways to Fix the “Errors were detected while saving Excel” Error

You’re not able to save the Excel file if there is no storage space on your hard drive. So, first check if your hard drive has sufficient storage space to save the file. If this is not the case, then it might happen that your antivirus program is interrupting the saving process. To check this, temporarily disable your antivirus program and then try to save the file. If still your Excel is throwing the “Errors were detected while saving Excel” error, then follow the below given methods to fix the error:

Method 1: Open the Excel in Safe Mode and Disable the Add-ins

When you open Excel in safe mode, it opens without the third-party add-ins. This helps in finding out if any add-ins are causing the error.

 Here’s how to open the Excel in safe mode:

  • Open the Run window by pressing Windows key + R.

  • Type excel /safe in the Run window.

    Excel Save Mode Command?

  • Next, click on OK.

  • It will open Excel in safe mode.

  • Now, try to open and save the affected file.

If you are able to save the file without any issue, then this means that the error has occurred due to third-party add-ins or settings. You can try disabling the add-ins to fix the issue. To do this, follow these steps:

  • First, open Excel.
  • Then, go to the File tab and click Options.

Go To Options Window

  • In Excel Options, click on the Add-ins

Select Add-ins

  • Under the Manage section, select Excel Add-ins and then click on the Go

Excel Add-ins Drop-down

  • In the Add-ins dialog box, unselect the add-ins under the Add-ins available option and click OK.

    Add-ins Window

Note: Disabling add-ins does not remove them from the system. To remove them permanently, you need to uninstall them.

Method 2: Check the Excel File Name

Some users have observed this error when saving the Excel file with an invalid name. You can check the file name and ensure that it should not contain more than 218 characters. If the name exceeds the required limit, then try shortening the file name or move the file to a folder with a short path name.

Method 3: Copy the Data from the Affected File to a New File

If you are not able to save the Excel document, then try copying the data from the affected file to a new Excel file. Then, save the new file with a different name. This helps in resolving the issue.

Method 4: Check and Provide File Permissions

You may experience the “Errors were detected while saving Excel” issue when you do not have desired permissions to modify the folder in which your Excel file is located. To modify the folder, you should have read, write, and create permissions. You can check and provide the desired permissions using the below steps:

  • Navigate to the Windows Program Files and then find the desired folder (where the Excel file is saved).
  • Right-click on the folder and then choose Properties.
  • Select the Security tab and then click
  • Click on Change Permissions in the Advanced Settings
  • Click Administrators and then click Edit.
  • Now set the Apply to drop-down button to This Folder, Subfolder, and Files.
  • Click on the Full Control field and then click Apply > OK.

Method 5: Check Pivot Tables in Excel Sheet

You can review Pivot tables to see if they are causing the “Errors were detected while saving Excel” error. To do so, follow the below steps:

  • Click Power Pivot > Manage.

    Check Pivot Table In Excel

  • Check the tabs in the Power Pivot

  • Check if all the formulas used in the table are correct. Sometimes, even a small typo can create an issue in Excel.

Method 6: Repair Your Excel File

The “Errors were detected while saving Excel” issue can also occur if the Excel file is corrupted. In such a case, you can take the help of the built-in utility in Excel – Open and Repair to repair your Excel file. Here’s how to use the tool:

  • In Excel, click the File tab and then click Open.
  • Click Browse to select the desired file.
  • The Open dialog box is displayed. Click on the corrupted file.
  • Click on the arrow next to the Open button and then click Open and Repair.
  • Click on the Repair

Click On Repair Button

  • After repair, a message will appear (as shown in the below figure).

    Message Appear After Repair

  • Click Close.

 However, sometimes, the Open and Repair utility fails to fix the file if it is severely corrupted or large-sized. In such a case, you can take the help of a third-party Excel repair software, such as Stellar Repair for Excel. The tool performs a comprehensive scan of the corrupted Excel file to fix the issues and recover all the items from the file without changing the original formatting. It can recover pivot tables, charts, images, engineering formulas, etc. The tool is compatible with Windows 11/10/8.1/8/7. You can download the free trial version of the tool to evaluate its functionality.

Closure

Many Excel users reported facing the situation when they are saving the Excel file. You can check the file’s compatibility to fix the “Errors were detected while saving Excel” issue. If you are getting this error in a Macro-enabled file then you can try deleting the VBA project from a document to resolve the issue. However, deleting the entire VBA code cannot be a better solution as it can lead a data loss in the Project you are working on. In the above article, you have learned the reasons behind the issue and discovered how to fix the error. Follow the methods and if none of them works then try using Stellar Repair for Excel. It is an advanced tool that can quickly repair corruption in Excel worksheets at any level. It lets you restore the corrupted components from the corrupted file without removing the existing data.

How to fix Microsoft Excel has stopped working error?

Summary: This blog discusses the possible reasons behind ‘Microsoft Excel has stopped working’ error and solutions to resolve the error manually. You can use Stellar Repair for Excel to quickly repair the file and recover all its data in a hassle-free manner.

Free Download for Windows

Has your Microsoft Excel program stopped working or is acting strange? Excel not responding is a common issue you may experience on launching the application or opening a spreadsheet.

Microsoft Excel has stopped working

Figure 1 – Microsoft Excel Has Stopped Working Error Message

Possible Causes behind ‘Microsoft Excel has Stopped Working’ Error, and Solutions Thereof

Note: Several users have reported about encountering the ‘Excel has stopped working’ issue on Windows 10, 8, and 7 OS after installing an update for Excel (KB3118373). If you too have installed the update, then uninstall it and check if it solves the error. For detailed information, refer to this link .

Resolve Compile Error in Hidden Module in Excel: Causes & Solutions

The hidden module in Excel refers to a container with VBA codes, custom queries, and complex macros. The compile error in a hidden (protected) module in the Excel worksheet usually occurs when doing different activities on a macro-enabled sheet, such as merging .xls files. The error can result in macros execution failure. You need to quickly resolve this compile error to restore full functionality of the VBA code. Below, we’ll be discussing the solutions to fix this Excel error. But before that, let’s see why this error occurs.

You may encounter the Compile error in hidden module due to one of the following reasons:

  • The code in the workbook is not compatible with the Excel application.
  • Manual queries created in a previous version are no longer compatible with your current version of Excel.
  • Missing references.
  • Invalid .exe files (control information cache files) are automatically created with ActiveX control insertion in Excel file.
  • Protected module is corrupted.
  • The workbook with hidden module is damaged or corrupted.
  • Incompatible add-ins.
  • Incompatible Excel file version.
  • The module is protected or password-protected.
  • Missing or corrupted mscomctl.ocx file.

Excel can throw the compile error while compiling the code that exists in the protected module. So, first check the error and identify the hidden module that is creating the issue. You can unprotect the module. Also, ensure that you have permission to access the VBA code in the module. If the error still exists, follow the below troubleshooting methods.

Method 1: Re-register ActiveX Control Files or mscomctl.ocx Files

You can get the compile error in the Excel file, containing the VBA code related to ActiveX controls or OCX files. The ActiveX control files and OCX files (mscomctl.ocx files) are the components of Microsoft’s standard controls library. The compile error in the hidden module can occur if these files are missing. In this case, you can use the Regsvr32 tool to re-register the OCX files. The Regsvr32  is a command-line utility to register and unregister OLE controls in the Windows registry.

Method 2: Delete .exd Files

 The .exd files are temporary files created by Excel when inserting ActiveX controls objects. These temporary files can lead to a compile error if they are corrupted. So, if this issue has occurred, particularly in the Excel file containing ActiveX controls, then deleting .exd files might fix the issue. To delete the .exd file, follow the below steps:

  • First, open the Run window by pressing the Windows+R keys.

Open The Run Window

  • In the Run window, type %appdata%.

Type App Data Command

  • In the Roaming window, click on the Microsoft option.

Click On Microsoft Option Under Roaming

  • Under Microsoft, you will see a list of folders. Search and click on Forms.
  • Right-click on a file with .exd extension and select Delete.
  • Once you delete the .exd files, restart your Excel application.

Method 3: Rollback the Office Updates

MS Office updates or upgrades may also cause the compile error in hidden module in Excel. If the error has occurred after downloading the recent Microsoft Office updates, try reverting to the previous version or uninstalling the recent updates to fix the issue.

Method 4: Unselect Missing References

The compile error in hidden module determine path in Excel can also occur if your file contains a reference to object library/type library, which is labelled as Missing. You can locate, check, and uncheck the references marked as ‘Missing’ to fix the issue. Here are the steps:

  • Open your Excel and press Alt + F11 keys.
  • The Visual Basic Editor is displayed.

Visual Basic Editor

  • Go to the Tools option and then click References.

Click On References Under Tools Option

  • In the References-VBAProject window, under Available References, search and unselect the references starting as “Missing”.

Unselect Missing References

  • Click OK.

Method 5: Check the Code in Module

The compile error in hidden module can occur if there are issues in the code within the module. The problems include incorrect or missing syntaxes, missing parameters/references, or the code contains incompatible functions or a wrong name of the object. You can check and fix these issues in the code by opening the VBA editor.

Method 6: Check and Remove Add-ins

In Excel, the compile error in macro-enabled files can also occur due to incompatible add-ins. You can check and disable the add-ins in Excel using the below steps:

  • First, open the Run window and type excel /safe and then click OK. The Excel application will open in safe mode.
  • Now try to open the affected Excel file. If it opens without the error, then check and remove the latest installed Excel add-ins.
  • Navigate to the File option and then select Options.
  • In the Excel Options window, click Add-ins.

Click Addins Select Latest Addins

  • Under Add-ins, search and select the latest add-ins, and then click on Go.
  • In the Add-ins window, uncheck the add-ins and then click OK.

Select  Analysis Toolpak

  • Restart Excel and then check if the error is fixed or not.

Method 7: Repair the Corrupt Excel File

Corruption in the Excel file can affect the macros in the hidden module, which may result in the compile error. In such a case, you can try repairing the Excel file using Microsoft’s inbuilt utility -Open and Repair. To use this tool, follow these steps:

  • Open your Excel application.
  • Click the File tab and then click Open.
  • Click Browse to select the affected workbook.
  • The Open dialog box will appear. Click on the corrupted file.
  • Click the arrow next to the Open button and then Open and Repair.
  • You will see a dialog box with three buttons - Repair, Extract Data, and Cancel.

Click On Repair Option

  • Click on the Repair button to recover as much of the data as possible.
  • After repair, a message is displayed. Click Close.

Message Appear After Repair

What if None of the Above Solutions Works?

If the above methods fail to get rid of the “compile error in hidden module” in Excel, then use an Excel repair tool such as Stellar Repair for Excel. This tool is specifically designed to repair the corrupted Excel file. It can recover all the components from corrupted Excel file (macros, queries, formulas, etc.) without changing their original formatting. The tool is compatible with all Excel versions and can be downloaded on a Windows system. You can download the free trial version of Stellar Repair for Excel to scan the corrupted Excel file and preview the data.

Closure

You can get the “compile error in hidden module” when Excel detects any issue while compiling the code in a protected module. It can occur when there is an issue with the macro-enabled Excel workbook or Excel add-ins. You can follow the above-mentioned methods to fix the issue. If the error occurs due to corruption in the database file, then you can try Stellar Repair for Excel . It can repair severely corrupted Excel files. It also helps recover all the Excel workbook’s components, including macros and queries. The tool has a simple and user-friendly interface.

Simple ways to Open Corrupt Excel file Without any Backup

Summary: The blog describes simple ways to open corrupt Excel file without any backup. It explains some manual workarounds that you can try to open the file. Also, it mentions about an Excel file repair tool that can quickly fix the corrupt file and recover data from it.

Free Download for Windows

Do you have an Excel file that does not open because of corruption issue? And every time you try to open it, an error message ‘the file is corrupt and cannot be opened’ pops-up?

Excel file is corrupt and cannot be opened message

Excel File Corruption Message

Also, you don’t have a healthy backup of the Excel file to restore the data? If so, you can try repairing the corrupt file by using a few simple yet effective manual workarounds mentioned below.

How to Open a Corrupt Excel File without Backup?

Following are some manual methods that can help you open a corrupt Excel file:

Method 1: Repair Corrupt Excel File

When attempting to open a corrupt file, Excel automatically starts ‘File Recovery’ mode to repair the file. But, if the recovery mode doesn’t start, try Microsoft Excel’s built-in ‘Open and Repair’ feature to manually repair the file.

To use this feature, perform the following steps:

Step 1: Open a Blank workbook in Excel, and then click File > Open.

Step 2: In the Open window, browse and select the corrupt file.

Step 3: Click the arrow that is beside the Open tab, and select Open and Repair.

Open a blank workbook in Excel, navigate to File > Open, choose the corrupt file, and, in the Open window, click the arrow beside the Open tab, selecting Open and Repair for file recovery.

Open and Repair Option

Step 4: Implement one of the following:

  • Click the Repair button. (This is to recover as much data as possible.)
  • Click the Extract Data button. (This is to recover values and formulas from the Excel file if the repair process fails to recover the entire data.)

Initiate file recovery by selecting the Repair tab, and if necessary, retrieve values and formulas using the Extract Data tab in Excel.

Excel Built-in Repair Options

If using Open and Repair does not work , move to the next method.

Method 2: Disable the Protected View Feature

Some Excel users have reported that turning off the ‘protected view’ feature in Excel helped them open the corrupt file. You can also try to disable this feature and open the file. To do so, follow these steps:

Step 1: Open a blank Excel file, click on File > Options.

Step 2: In the Excel Options window, select Trust Center, and then click Trust Center Settings.

In the Trust Center tab, click on Trust Center Settings...

Excel Trust Center Settings

Step 3: Click OK.

Now check if you can open the corrupt file. If not, try implementing the next method.

Method 3: Look For Automatically Recovered Excel File

If you have Excel’s AutoRecover feature enabled, you’ll have access to a copy of the Excel file corrupted or lost due to application crash, power outage, or accidental deletion.

The ‘AutoRecover’ feature saves Excel worksheets at a temporary location after a certain time interval. It saves the worksheets automatically and is turned on by default to reduce the chance of data loss.

Check if you can recover corrupted Excel file by following these steps:

Step 1: In Excel, open a Blank workbook.

Step 2: Go to File and click Options.

Open a new Excel workbook, then access additional settings by navigating to File and selecting Options.

Figure 5 – Excel Options

Step 3: In the Excel Options dialog box, click Save, and then copy the ‘AutoRecover file location’.

Copy the 'AutoRecover file location' for configuration or backup purposes.

Excel Options Window

Step 4: Open File Explorer window and paste the copied AutoRecover file location, and press Enter.

Step 5: A list of saved Excel files will be displayed. Choose the file you want to recover.

TIP: Use Excel’s AutoBackup feature to reduce chances of data loss, by saving a previous version of your spreadsheet automatically.

Use an Excel File Repair Software

If the above manual methods fail, repair the corrupt Excel file by using a third-party software, such as Stellar Repair for Excel**.** The software helps repair Excel (XLS and XLSX) files easily and effectively.

Free Download for windows

Read this: How to repair corrupt Excel file using Stellar Repair for Excel?

Some key features of Excel Repair software are as follows:

  • Fixes all errors in the MS Excel file.
  • Repairs multiple damaged Excel files in a go.
  • Recovers chart, chart sheet, table, cell comment, image, formula, and sort & filter.
  • Preserves properties and cell formatting of Excel worksheets.
  • Previews recoverable Excel file data before saving.
  • Recovers all data components from the corrupt files and saves them in a new blank Excel file.
  • Compatible with Excel 2019, 2016, 2013, 2010, 2007, and lower versions.

Conclusion

You can try the workarounds discussed in the blog to open a corrupt Excel file without a backup. Disabling the protected view feature can help you open the file. If the issue persists then try repairing the corrupted Excel file using the Open and Repair utility. Although, it may not be able to fix a severely corrupted workbook. In such a case you can use Stellar Repair for Excel . It is an advanced tool that can help you repair a corrupted Excel file with 100% integrity.


  • Title: Fixed Were Sorry But Excel Has Run into an Error | Stellar
  • Author: Nova
  • Created at : 2024-03-11 13:11:12
  • Updated at : 2024-03-14 21:30:25
  • Link: https://phone-solutions.techidaily.com/fixed-were-sorry-but-excel-has-run-into-an-error-stellar-by-stellar-guide/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Fixed Were Sorry But Excel Has Run into an Error | Stellar