How to Fix Excel 2021 Run Time Error 1004
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.
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 | VBCopy |
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.
- 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.
- 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.
- 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.
- A 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.
Also read:
- How to Manually Install a Hardware Driver in Windows 11 & 10 & 7
- How to Repair corrupt MP4 and MOV files of GT 10 Pro?
- How to retrieve erased messages from Nokia XR21
- How to recover old music from your Samsung Galaxy S23 FE
- How to Rescue Lost Pictures from Vivo S17?
- How to Recover Deleted Photos from Android Gallery App on Vivo V30 Lite 5G
- 5 Easy Ways to Copy Contacts from Vivo Y78 5G to iPhone 14 and 15 | Dr.fone
- How to Restore Deleted Xiaomi Redmi 13C 5G Photos An Easy Method Explained.
- How To Restore Missing Call Logs from Nokia C300
- How to Rescue Lost Videos from Vivo Y78t
- How to Recover lost Calendar on iPhone 8 | Stellar
- How to rescue lost call logs from Galaxy M14 5G
- How to restore wiped call history on Nubia ?
- How To Restore Missing Music Files from Motorola Razr 40
- How to sign Word 2016 free
- How to restore wiped music on Motorola G24 Power
- How to Remove MDM from iPhone XS Max without Apple ID?
- How To Recover Lost Data on iPhone 12 mini? | Dr.fone
- How to identify missing hardware drivers with Windows Device Manager in Windows 7
- How To Restore Missing Contacts Files from Xiaomi Redmi Note 12T Pro.
- 5 Techniques to Transfer Data from Google Pixel Fold to iPhone 15/14/13/12 | Dr.fone
- 2 Ways to Transfer Text Messages from Honor Play 8T to iPhone 15/14/13/12/11/X/8/ | Dr.fone
- How to Restore Deleted OnePlus Open Photos An Easy Method Explained.
- 4 Ways to Transfer Music from Motorola Moto E13 to iPhone | Dr.fone
- How to retrieve lost files from Oppo Find N3?
- 2 Ways to Transfer Text Messages from Motorola Moto G24 to iPhone 15/14/13/12/11/X/8/ | Dr.fone
- How to repair corrupted PDF file when manual method fails | Stellar
- How To Exit DFU Mode on iPhone 15 Pro? | Dr.fone
- How to Fix Videos Not Playing on Nubia ?
- How to retrieve erased call logs from GT 5 Pro?
- How to make a digital signature for .wps file
- How to identify malfunctioning drivers with Windows Device Manager in Windows 10
- How to Rescue Lost Pictures from Google Pixel Fold?
- How to recover old call logs from your C22?
- 3 Things You Must Know about Fake Snapchat Location On Vivo S17e | Dr.fone
- How to Spy on Text Messages from Computer & Vivo Y100t | Dr.fone
- How To Fake GPS On Vivo S17t For Mobile Legends? | Dr.fone
- In 2024, How To Track IMEI Number Of Infinix Note 30 Pro Through Google Earth?
- How to Easily Hard reset my Oppo A2 | Dr.fone
- Detailed guide of ispoofer for pogo installation On Vivo Y02T | Dr.fone
- In 2024, Can I Remove the Apple Watch Activation Lock By iPhone 12 Pro Max without the Previous Owner?
- How To Update or Downgrade Apple iPhone 6 Without Data Loss? | Dr.fone
- 9 Best Phone Monitoring Apps for Oppo A2 | Dr.fone
- How To Fix OEM Unlock Missing on Infinix GT 10 Pro?
- Updated The Power of Slow Motion Edit Your Videos for Free with Filmoras Pro Tools
- Thinking About Changing Your Netflix Region Without a VPN On Tecno Spark 10 5G? | Dr.fone
- How to Bypass FRP from Vivo X Flip?
- Why does the pokemon go battle league not available On Motorola Defy 2 | Dr.fone
- Ways to trade pokemon go from far away On Vivo X90S? | Dr.fone
- In 2024, How To Change Oppo A18 Lock Screen Clock in Seconds
- In 2024, How to Unlock iPhone 12, Apples New iPhone | Dr.fone
- In 2024, 8 Ways to Transfer Photos from Oppo A1x 5G to iPhone Easily | Dr.fone
- A Detailed VPNa Fake GPS Location Free Review On Vivo Y17s | Dr.fone
- New Say Goodbye to Adobe 10 Linux Video Editing Software You Need for 2024
- 2024 Approved How to Convert Images Into Video - Kapwing Tutorial
- 2024 Approved Ultimate Guide How to Live Stream on Facebook?
- How to Remove Forgotten PIN Of Your Xiaomi 13T
- New In 2024, The Most Efficient Techniques to Make 3D Animation Character
- Trouble with Apple iPhone SE Swipe-Up? Try These 11 Solutions
- Ultimate Guide to Catch the Regional-Located Pokemon For Samsung Galaxy A24 | Dr.fone
- iPogo will be the new iSpoofer On Vivo S18e? | Dr.fone
- 2024 Approved Create Stunning Slow-Mo Videos with Windows Live Movie Maker Updated 2023
- How to Bypass Android Lock Screen Using Emergency Call On Vivo Y100 5G?
- Still Using Pattern Locks with Vivo V29 Pro? Tips, Tricks and Helpful Advice
- How to Remove the Activation Lock On your iPad and iPhone 8 Plus without Apple Account
- In 2024, How to Detect and Remove Spyware on Xiaomi Redmi 13C? | Dr.fone
- Title: How to Fix Excel 2021 Run Time Error 1004
- Author: Nova
- Created at : 2024-05-19 18:32:11
- Updated at : 2024-05-21 02:34:23
- Link: https://blog-min.techidaily.com/how-to-fix-excel-2021-run-time-error-1004-by-stellar-guide/
- License: This work is licensed under CC BY-NC-SA 4.0.