Run Time Error 1004: 3 Ways to Fix it

To eliminate Runtime errors in Excel, simply create a new template.

by Vladimir Popescu
Vladimir Popescu
Vladimir Popescu
Managing Editor
Being an artist his entire life while also playing handball at a professional level, Vladimir has also developed a passion for all things computer-related. With an innate fascination... read more
Reviewed by Vlad Turiceanu
Vlad Turiceanu
Vlad Turiceanu
Passionate about technology, Windows, and everything that has a power button, he spent most of his time developing new skills and learning more about the tech world. Coming... read more
Affiliate Disclosure
  • Runtime errors are common Windows-specific issues that occur while the program is running.
  • Extensions, plug-ins, and even other applications can cause Runtime errors in a particular program.
  • Excel makes no exception, with many users reporting Excel Runtime error 1004 on Windows.
  • Try your hand at these quick fixes and avoid losing your data over this anomaly.

Excel runtime error 1004 typically comes up when you are working with a corrupt document. You also get this error if you open a VBA Excel file when your Excel is having a conflict with other programs.

The Excel runtime error 1004 could show up due to a variety of other underlying issues. The most common error messages include the following:

  • VB: run-time error 1004: Application-defined or object-defined error
  • Excel VBA Runtime error 1004 Select method of Range class failed
  • runtime error 1004 method range of object _global failed visual basic
  • Excel macro Run-time error 1004
  • Runtime error 1004 method open of object workbooks failed
  • Run time error 1004: Method Ranger of Object Worksheet Failed
  • Save As VBA run time Error 1004: Application-defined or object-defined error

If you get any of these errors, then you can fix the error using the solutions here.

Quick Tip:

Before doing anything else, you can simply fix all the broken files like Excel documents with a PC repairing software like Kernel Repair for Excel.

Excel data is accurately restored, including table, chart, formula, chart sheet, picture, cell comment, sort, filter, fields, forms, and reports.

Kernel Repair Excel

Advanced methods are used to restore and save the original data structure and features.

What is Run Time error 1004 in Excel?

The runtime error is specific to apps that integrate Microsoft Visual Basic for Application (also known as VBA) script to run repetitive tasks.

All Microsoft Office applications use this Windows-specific programming, but the most prevalent issues arise in Excel, especially Excel 2007.

Many users report having issues when creating macros. A macro is a feature in Excel that records keystrokes and clicks in order to help you automate repetitive tasks.

Oftentimes, this task gets in conflict with the VBA which leads to the 1004 error. Another common cause is a corrupt Excel application or a corrupt XLS file.

Other possible causes that have been linked to this error include having a number of legend entries that exceed the space available, and a file conflict between Excel and other apps.

How do I fix runtime error 1004 in Excel?

The good news is that this error has been around for a while and there are several proven methods that will help you fix it.

1. Uninstall Microsoft Works to fix Runtime error 1004

  1. Press the CTRL + ALT + DEL combination and click on Task Manager.
  2. End all the programs that are currently open.
  3. Next, press the Windows key + R to open the Run utility.
  4. Here, enter appwiz.cpl and click the OK button.excel-runtime-error-1004-uninstall-microsoft-works
  5. From the list of programs installed on your computer, find Microsoft Works. Right-click on it and hit Uninstall.

2. Delete GWXL97.XLA to fix Run Time error 1004

  1. Start by opening File Explorer on your computer. You can do this by pressing the Windows keyE.
  2. Next, click on the address bar, type in the following path, and hit Enter: C:Users\user name\AppData\Local\Microsoft\Excel
  3. Here, open the XLStart folder.
  4. Finally, find the GWXL97.XLA file and delete it.

3. How to fix Runtime error 1004 by creating a new template

A great and easy method to fix runtime error 1004 is to use a new Excel template.

Expert tip:


Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

You need to transfer the template from the Excel file that had issues to the new one, and the runtime error will be gone.

While we’re at it, you might want to learn more about the Excel application and its best uses.

If so, take a closer look at our Excel page to get your hands on countless informative recommendations and error fixes.

1. Launch Microsoft Excel on your computer.

2. Next, create a new Microsoft Excel workbook by pressing the CTRL + N combination or selecting Blank workbook from the first screen.

excel new workbook

3. After making the workbook delete all the sheets on the workbook except one.

4. Format the remaining sheet.

5. Then go to File > Save As.

6. Save the file with the Excel Template (.xltx or .xlt) file format.

7. When the document is saved successfully, you can insert the template with the help of this code:Add Type:=pathfilename

  • Replace filename with the actual name of the document.

Knowing that there are many causes of the runtime error 1004 in Excel, only one solution may work.

With the help of this guide, you can now fix the Microsoft Excel runtime error 1004 and recover your file data.

In case you need further assistance, we have a dedicated Hub for Troubleshooting Runtime Errors that is full of articles like the one below.

This article covers:Topics: