Over the past few days, some of our users have reported that Excel macros have runtime error 1004. If you use a VBA procedure to select a range that is definitely not on the active sheet, VBA will show runtime error 1004. Because if you want to select a cell or range by cells for a specific calculation sheet, you must be active in that sense. You cannot fully select a cell on Sheet 1 when Sheet 2 is actually active.
Microsoft Visual Basic for Applications (VBA) helps users write programs that are suitable for the Windows operating system. It is an internal programming languagein Microsoft Office, such as Word, Excel, and PowerPoint.
Some users have reported that when they run an excel chart in vba or try to create a trusted macro in excel documents, they get all the error messages saying: Runtime Error 1004. And then they can’t find access to the excel files. If you are experiencing the same as these users, this post is usually for you. You have the opportunity to find both the causes and the corresponding solutions for this error signal on this page.
Run-time Error Details
How do I fix runtime error 1004 in Excel?
Launch Microsoft Excel.From the menu bar, select File > Options [Excel] > Trust Center > Trust Center Settings > Macro Options.In the best section, select the radio button because “Disable all macros with notification”
The message contains more information than the new error code 1004. Generally, you can try the error code to see the correct short description. The most common comment errors are listed below:
- Runtime error 1004: Application or object error.
- Runtime Error 1004: Object Worksheet Method Ranger failed.
- Runtime error 1004: Spreadsheet class copy method failed.
The Reason Why You’re Seeing Runtime Error 1004 In Excel
If people want to know how to properly recover an error, runReading 1004 in Excel, they need to understand what is causing this problem. The following reasons are undoubtedly the most important.
The macro you’re running is another source spreadsheet for a book with a specific title that viewers didn’t save and close before running the macro.
How do I fix error 1004 in VBA?
Try again: this error occurs when renaming this sheet. If the worksheet name already exists and someone tries to assign the same recognition to another worksheet, VBA will return a runtime error 1004 saying “The name is already taken. Try something really different.
There may be conflicts with other programs when opening an Excel VBA file.
The Excel Story Chart has more lists of legends than there is room to display all of the legend entries in the chart.
Fix Runtime Error In Excel 1004
While there are many causes for this Excel error 1004 issue, there are a few valid methods that can help users access files again. Let’s check them all one by one.
Fix 1. Delete GWXL97.XLA
The easiest way to get Excel error 1004 is to find the corrupted file and delete it.
Step 3: Open the Excel file again and check if the problem is indeedshena.
Fix 2: Check Trusted Access And VBA Project Solution Object Model
You can also try running the VBA project trust option through the Excel Trust Center. Follow the careful steps and give it a try.
Step 2. Open a blank Excel image and click Files on n . on the left.
Step 4: In the Macro Options section, check the “Allow access to the object model of your VBA project” box.
Fix 3. Create Another Excel Template
This method can still be a little tricky, but it’s actually useful and worth a try.
Step 1: Create a new Excel workbook and make sure it only contains your worksheet.
Step 2. First, format the workbook, and then paste the necessary data into it.
A few steps. Click File > Save As, enter a file name, and look at the drop-down arrow in the Files of Type column.
Now you can configure it programmatically using the following coupon: add Type:=pathfilename. The filename is the one you specify when manifesting the new Excel template.
Fix4. Repair Corrupted Excel Files
If all the basic solutions didn’t work for you, the particular Excel file you’re trying to offer may be corrupted. To repair a corrupted excel file, you can rely on theme file recovery software. EaseUS Data Recovery Wizard is a good choice.
Use this gadget to click the “Scan” button and wait for it to find all the corrupted documents. Then decide on the desired document and select “Restore”. That’s all you can do to repair a corrupted Excel or Word file using the EaseUS Data Recovery Wizard.
Download the software and follow the detailed instructions below to repair the corrupted Excel file.
Step 1: Run the EaseUS Data Recovery Wizard. Select a location on your hard drive where corrupted files will be saved. Click “Scan” to start looking for corrupted files. With EaseUS File Repair Tool, you can repair damaged documents, stuck solutions, and images of various formats.
Step 2. After scanning, you can quickly find virus-infected data by file type. If someone wants to recover corrupted Word, Excel, or PDF files, select documents and filter out a certain trusted category. All common types can be supported for online image and video recovery, including JPEG, PNG, BMP, MOV, MP4, GIF, etc.
Step 3. The EaseUS archive recovery program will automatically restore the created files. You can preview the recovered files before recovery. Finally, click “Recover” to save the recovered files to another work location to avoid overwriting personal information.
After reading this, you should have a good idea of ‚Äč‚Äčhow long it takes to fix Runtime Error 1004. If you’re really sure that the Excel file you’re trying to open is indeed valid, the first three tools will help you. .
After an Excel file is found to be corrupted, a commercial data recovery tool is the best choiceX. It is worth noting that in addition to corrupted Excel files, EaseUS Data Recovery Assistant can help you with virus attack, accidental file deletion and sudden system crash.
|Possible Solutions||Step by step troubleshooting|
|Fix 1. Remove GWXL97 files||Fix each of our Excel 1004 errors xla and delete the error file. Navigate to C:Program FilesMS OfficeOfficeXLSTART… Full Steps|
|Fix 7: Managing Trusted Access to the VBA Project Object Model||Enable the VBA project approval option in the Excel Trust Center to fix Excel error 1004. Open a blank Excel file… Steps completed|
|Fix 3. Create another Excel template||Create a new large Excel workbook and make sure there is only one worksheet next to it. Format the book first… Steps Done|
|Solution 4: Repair corrupt Excel file||Recover corrupted files in Excel with a reliable recovery tool. EaseUS File Recovery Products Repair Corrupted Excel Files… Complete Steps|