How to Fix Excel VBA Error 1004: Method Goto of Application Failed
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.

- 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 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.
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.
Press the ALT + F11 keys on your keyboard simultaneously to open the Visual Basic for Applications (VBA) editor.
Press CTRL + G to open the Immediate Window, which typically appears at the bottom of the VBA editor screen.
Type 'Application.ScreenUpdating = True' directly into the Immediate Window and press Enter.
Close the VBA editor or press ALT + F11 to return to your workbook. The interface should now be refreshed and fully interactive.

Remove Worksheet Protection from Target Sheet
Resolve Error 1004 by ensuring the destination worksheet allows selections and is not locked by protection.
Validate the Target Reference Syntax
Ensure the Application.Goto method points to a valid, explicitly defined range or worksheet name.
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. Install WPS Office: Download and install the free WPS Office suite on your device.
- 2. Open your macro file: Launch WPS Spreadsheet and open your existing .xlsm or .xls file.
- 3. Enable Macros: Click the security warning prompt at the top to enable macro execution.
- 4. Run smoothly: Execute your VBA codes in a stable environment optimized for efficiency.

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.




