Experiencing Run-time Error 1004 in Excel VBA? Learn what causes this Excel error, how it affects users, and the most effective solutions to fix it.
Introduction
Run-time Error 1004 is a common issue in Microsoft Excel, typically occurring when executing VBA macros, creating pivot tables, or opening new worksheets. This error can disrupt workflow, making it crucial to identify the root cause and apply the right fix.

Many users have reported encountering this error due to faulty add-ins, incorrect VBA references, protected sheets, or corrupt Excel files. A recent case showed that disabling the “Acrobatexceladdin” successfully resolved the issue for multiple users. This guide provides tested solutions to fix this error and prevent it from recurring.
Causes of Run-time Error 1004
This error can occur for various reasons, including:
- A problematic Excel add-in, such as Acrobatexceladdin, interfering with Excel’s functionality.
- A macro attempting to reference an incorrect worksheet, range, or object.
- Running VBA code on a protected sheet without unprotecting it first.
- A corrupted startup file causing Excel to load with errors.
- Issues when creating pivot tables due to incorrect field names or invalid source ranges.
- An outdated or damaged Excel installation affecting its stability.
Fixing Run-time Error 1004 in Excel

Disable Problematic Add-ins (Acrobatexceladdin)
If the error occurs when opening a new worksheet, an Excel add-in may be the cause. Many users found that disabling Acrobatexceladdin stopped the error.
To disable add-ins on Windows:
- Open Excel and navigate to File > Options.
- Click on Add-ins and select COM Add-ins from the Manage dropdown.
- Click Go, uncheck Acrobatexceladdin, and click OK.
- Restart Excel to check if the issue is resolved.
For Mac users:
- Open Excel and go to Excel > Preferences > Add-ins.
- Locate Acrobatexceladdin and disable it.
- Restart Excel.
Fix VBA Macros with Correct References
When running a macro, the error often appears as “Application-defined or object-defined error” due to missing or incorrect worksheet and range references.
To fix this, ensure the macro points to the correct sheet and range:
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1") ' Update with actual sheet name
ws.Range("A1").Value = "Test"
If the macro is running on a protected sheet, unprotect it before executing:
ActiveSheet.Unprotect Password:="yourpassword"
Also, verify named ranges under Formulas > Name Manager to ensure they exist.
Fix Run-time Error 1004 When Creating Pivot Tables
When using VBA to create a pivot table, this error may appear if the field name does not exist or the data source is incorrect.
Check that the field name matches exactly:
Dim fld As PivotField
For Each fld In pt.PivotFields
Debug.Print fld.Name
Next fld
If the error persists, use an alternative method to add the DataField:
pt.AddDataField pt.PivotFields("Amount"), "Sum of Amount", xlSum
Also, confirm that the PivotCache source is valid:
Set pc = wb.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=ws.Range("A1:Z" & lastRowMonth))
Reset Excel Preferences and Startup Files
If the error continues even after reinstalling Excel, resetting preferences and clearing startup files may help.
For Mac:
- Close Excel and go to
~/Library/Preferences/
. - Delete the com.microsoft.Excel.plist file.
- Restart Excel.
For Windows:
- Navigate to
C:\Users\YourUsername\AppData\Roaming\Microsoft\Excel\XLSTART\
. - Remove any
.xlam
or.xltm
files. - Restart Excel.
Repair or Reinstall Microsoft Excel
If none of the above solutions work, Excel itself may be corrupted.
On Windows:
- Open Control Panel > Programs and Features.
- Select Microsoft Office, click Change, and choose Repair.
On Mac:
- Open Finder > Applications.
- Delete Microsoft Excel and reinstall it from the Microsoft website or App Store.
Preventing Run-time Error 1004 in the Future
To minimize the chances of encountering this error again:
- Disable unnecessary add-ins to avoid conflicts.
- Test VBA macros in a sample workbook before applying them to important files.
- Use correct object references and fully qualified worksheet names.
- Keep Excel updated to ensure compatibility with new features and fixes.
- Implement error handling in VBA to prevent script failures: vbaCopyEdit
On Error Resume Next
Conclusion
Run-time Error 1004 in Excel can occur due to faulty add-ins, VBA script errors, corrupt startup files, or pivot table issues. Disabling Acrobatexceladdin, correcting VBA references, and repairing Excel are some of the most effective solutions.
By following the steps outlined above, users can resolve this error and improve their Excel performance. To avoid future issues, always manage add-ins carefully, test macros, and keep Excel updated.
Visit Our Post Page: Blog Page