How to Fix Runtime Error 1004

Attention Before you read this tutorial, I highly recommend you check out my resources page for access to the tools and services I use to not only maintain my system but also fix all my computer errors, by clicking here!

Runtime errors are a fairly common annoyance for a great many Windows users, all of which come with their own code which specifies the cause and the solution.

With that said runtime error 1004 typically occurs when using Microsoft Excel. The 1004 is a general code that relates to Microsoft Excel, but isn’t specific to one particular cause, so the exact reason why you are experiencing this error will vary, based on circumstance.

As a result, there are a number of solutions that you may be forced to try in order to solve this problem. In this article, I will be covering the more common causes for the runtime error 1004, while providing the more common solutions.

Common Error Messages

This runtime error 1004 can occur on the following versions of Microsoft Office:

  • Microsoft Office 2003
  • Microsoft Office 2007
  • Microsoft Office 2010
  • Microsoft Office 2013

The error messages that are most commonly associated with this runtime error are as follows:

Runtime Error 1004 method range f object _global failed visual basic

Excel Macro “Run-time error 1004”

Excel VBA Runtime error 1004 “Select method of Range class failed”

Runtime Error 1004 method open of object workbooks failed

VB: run-time error 1004: Application-defined or object-defined error

Symptoms of This Error

Each runtime error that you encounter has its own particular symptoms that characterises that particular error code. The error 1004 usually occurs while using Microsoft Excel or when attempting to use Microsoft Excel. When the error occurs, it will usually be accompanied by one of the many error messages highlighted above.

Other symptoms entail, an inability to access certain resource libraries, forcing you to restart the application, intermittent software performance and random software crashing.

Reasons for This Error

The reasons for the runtime error 1004 are quite numerous, they range from configuration issues to software problems; a synopsis of these reasons is as follows:

  • User attempts to copy and paste filtered data into a Microsoft Excel workbook.
  • A programmed range value is incorrectly set.
  • The Microsoft Excel startup icon has become corrupted.
  • A conflict occurs between one or two programs while attempting to open a VBA Excel file.

Fixing Runtime Error 1004

The good thing about the vast majority of runtime errors is that it’s possible for the end user to fix them by themselves, even if they lack any real technical skills. If you have at least a basic understand of computers, consisting of how to properly use the application you are having problems with then you should be able to fix this problem by yourself.

The runtime error 1004 is fairly common for most Excel users, but it doesn’t have to be the bane of your existence. As is the case with all runtime errors, as long as you know how to fix them, you should have very little problem, when confronted with one. The steps that I have outlined below are fairly simple, providing they are followed correctly.

Use Registry Cleaner

Since runtime errors generally are the result of registry conflicts, running a full scan of your system using a reliable registry cleaner can fix issues like this, most of the time.

As you install, use and uninstall applications, subtle changes are made in your registry which leads to invalid and corrupt entries. Scanning your system for registry conflicts is not something you should do exclusively for this error, but as a vital maintenance procedure.

Anyway, for this particular task, I recommend you download and install SpeedyPC Pro, which is one of the more reputable registry cleaners on the market. You can acquire this program from here:

Uninstall Microsoft Works

Sometimes the runtime error 1004 is due to a conflict between Microsoft Office and Microsoft Works. If you have both of these application suites running on your computer, consider uninstalling Microsoft Works and seeing whether that has fixed the error.

If you don’t know how to uninstall an application, simply follow the instructions below:

1. First, ensure you have booted into your computer with administrative rights.

2. Then click on Start -> Run, type appwiz.cpl and click on OK. [Windows Vista/7: Start -> Type appwiz.cpl (into the Search programs and files box) and Press Enter]

Open Add or Remove Programs

3. Once Add or Remove Programs [Windows Vista/7: Uninstall or change a program] loads up, highlight Microsoft Works, and then click on Remove [Windows Vista/7: Uninstall].

Remove Microsoft Works

Run a Virus Scan

Scanning your system in its entirety is very important in ensuring the removal of malware, viruses and corrupt files. Thus, I highly recommend you run a full virus scan of your system with your current antivirus tool. However, if you don’t have one, then you should check out my post on the best antivirus tools, for more help.

Remove GWXL97.XLA

If you receive the following error Method on Key Up Object_Application Failed while using Microsoft Excel, then one way of fixing it is to do the following:

1. First, ensure you have booted into your computer with administrative rights.

2. Then right click on the Start Button and select Explore [Windows Vista/7: Open Windows Explorer].

Start -> Open Windows Explorer

3. Once Windows Explorer loads up, navigate to the XLSTART folder of Microsoft Office.

Double click on XLSTART

Note: Depending on the version of Microsoft Office, this could be some variation of the following path: C:\Program Files\Microsoft Office\Office12\XLSTART

4. From here, right click on the GWXL97.XLA file and select Delete.

Remove GWXL97.XLA File

Save Excel Workbook

It’s a common occurrence for individuals to experience the runtime error 1004 while working with macros. In Excel, it is possible for you to run macros that copy or duplicate worksheets then put them into the same workbook they were originally located in.

This action can cause an error 1004, with the user being presented with either the method of copying the worksheet failed or object-defined error or application-defined error message.

The cause of this problem is usually due to the user giving the workbook a name and copying it, without closing the workbook, beforehand.

In order to solve this problem, simply save your workbook periodically, prior to the copying process. Bearing in mind that the number of times a worksheet can be copied or duplicated before a save is required, depends on the size of the file.

Visual Basic Fix

If you experience a runtime error 1004 while attempting to use Visual Basic within Microsoft Excel, then simply do the following to rectify the problem.

1. First, ensure you have booted into your computer with administrative rights before you load up Microsoft Excel.

2. Once Microsoft Excel is up and running, click on the Office Button, then click on Excel Options.

Access Excel Options

3. Once Excel Options loads up, click on the Trust Center Tab, and then click on Trust Center Settings.

Click on Trust Center Settings Button

4. This will bring up Trust Center Options, from here, click on the Macro Settings Tab, then click on Trust access to the VBA project object model and click on OK.

Check box next to Trust access to the VBA project object model

Note: Once you’ve enabled this feature, there are two options you can use to fix your problem, these are:

1. To change the VBA Macro code so that only single rows are copied and pasted, especially the row portion that contains the data.

2. To change the VBA Macro code to loop copy so that small portions of data are copied at any one time.

Create New Excel Template

A viable method that individuals can use to solve error 1004 related to Microsoft Excel is to put a new worksheet file into a template, rather than copying or duplicating an existing worksheet. To do this, simply follow the instructions below:

1. Assuming you already have Microsoft Excel up and running, create a new Workbook file.

2. Then remove all but one of the Worksheets.

3. Then format the Workbook to your liking.

4. Add any charts, data or text that you would like to be in your default template.

5. Then click on the Office Button, and then click on Save As.

Click on Save As

6. From the Save As applet, select Template for the Save as type, then give it a File name and click on Save.

Create and Save Template

Note: If you would like to programmatically insert the template then use the following code:

Sheets.Add Type:=path\filename

Filename = the path of the saved template.

Are you looking for a way to repair all the errors on your computer?
speedypc pro image

If the answer is Yes, then I highly recommend you check out SpeedyPC Pro.

Which is the leading registry cleaner program online that is able to cure your system from a number of different ailments such as Windows Installer Errors, Runtime Errors, Malicious Software, Spyware, System Freezing, Active Malware, Blue Screen of Death Errors, Rundll Errors, Slow Erratic Computer Performance, ActiveX Errors and much more. Click here to check it out NOW!

RECOMMENDED: Click here to fix your Windows errors and optimize system performance