logo
search
Excel Error Codes

How to Fix Excel VBA Error 1004: Method Goto of Application Failed

Bushra ParveenBushra Parveen Sep 30, 2026 869 views

Question details

The user is experiencing VBA Run-time Error 1004 when executing the Application.Goto method, and the Excel worksheet becomes completely frozen and unresponsive after the macro is halted.

How to Fix Excel VBA Error 1004: Method Goto of Application Failed
Product
Microsoft Excel
Device & OS
not provided
Scenario
Running a VBA macro that navigates between worksheets or ranges using the Application.Goto method.
Observed behavior
Excel throws a 'Method Goto of Application Failed' error. When the macro stops, the worksheet appears frozen, preventing the user from clicking or typing anywhere.
Before you start

Before modifying your VBA code, verify whether the target worksheet involved in the Goto method is currently hidden, as attempting to navigate to a hidden or very hidden sheet instantly triggers Error 1004.

Solution 1Recommended

Restore Screen Updating via the Immediate Window

Fix the frozen worksheet issue caused by the macro halting while screen updating was still disabled.

When a macro crashes on the Application.Goto line, it often bypasses the code intended to turn screen updates back on. This leaves Excel visually frozen, even though the application is still running in the background.

1
Open the VBA Editor

Press the ALT + F11 keys on your keyboard simultaneously to open the Visual Basic for Applications (VBA) editor.

2
Access the Immediate Window

Press CTRL + G to open the Immediate Window, which typically appears at the bottom of the VBA editor screen.

3
Run Screen Updating Command

Type 'Application.ScreenUpdating = True' directly into the Immediate Window and press Enter.

4
Verify Worksheet Responsiveness

Close the VBA editor or press ALT + F11 to return to your workbook. The interface should now be refreshed and fully interactive.

Restore Screen Updating via the Immediate Window
Prevent Future Freezes: Always include proper error handling routines in your VBA scripts to ensure Application.ScreenUpdating is reset to True even if an error occurs.
Free Microsoft Office alternative

Experience seamless macro compatibility with WPS Office

Tired of freezing spreadsheets and complex VBA run-time errors? WPS Office offers a lightweight, free alternative to Microsoft Excel with robust support for macros and excellent data handling capabilities.

  1. 1. Install WPS Office: Download and install the free WPS Office suite on your device.
  2. 2. Open your macro file: Launch WPS Spreadsheet and open your existing .xlsm or .xls file.
  3. 3. Enable Macros: Click the security warning prompt at the top to enable macro execution.
  4. 4. Run smoothly: Execute your VBA codes in a stable environment optimized for efficiency.
Fully compatible with Microsoft Excel formats (.xlsx, .xlsm, .csv)Built-in VBA editor supporting legacy and modern macro scriptsLightweight installation with incredibly fast load times for large datasetsFamiliar tabbed interface requiring zero learning curve to master
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel completely freeze after my VBA macro crashes with Error 1004?

When a macro crashes mid-execution, background functions like Application.ScreenUpdating = False often remain active. Because the macro did not finish its run to turn screen updates back on, Excel stops visually refreshing, which makes the application appear completely frozen to the user.

What is the correct syntax for using the Application.Goto method?

The standard syntax is Application.Goto Reference:=[TargetRange], Scroll:=[True/False]. When navigating to a different worksheet, ensure your target range explicitly defines both the sheet and the cell, such as Application.Goto Reference:=Worksheets("Data").Range("A1").

Can a hidden worksheet cause the Application.Goto method to fail?

Yes, attempting to use the Application.Goto method to select a cell or range on a hidden or very hidden worksheet will immediately trigger Run-time Error 1004. You must include code to unhide the worksheet before navigating to it.

Does VBA Error 1004 mean my workbook is corrupted?

No. Error 1004 is a standard run-time error simply indicating that the code asked Excel to perform an action it couldn't complete, such as finding a worksheet that was renamed, deleted, hidden, or locked.