Excel Not Responding After a Macro? What to Do

VBA & macros · Updated November 3, 2026

Excel Not Responding After a Macro? What to Do

If Excel says “Not Responding” after you run a macro, first give it a moment and check whether it is still working; large loops, recalculation, or file operations can temporarily block the interface. If it remains stuck, try to interrupt the macro with Ctrl+Break on Windows, then recover the workbook without immediately ending Excel or losing unsaved changes.

What “Not Responding” Means After a Macro

Excel displays “Not Responding” when Windows is not receiving a timely response from the application’s main interface. It does not, by itself, prove that Excel has crashed. A VBA macro can occupy Excel’s main thread while it processes thousands of cells, refreshes data, recalculates formulas, or communicates with another program. During that work, the window may stop repainting and Windows may label it unresponsive.

There is an important distinction between a slow macro and a stuck one. A macro that eventually finishes may leave Excel responsive again, while a macro caught in an endless loop, waiting for a hidden prompt, or repeatedly processing the same data may never finish on its own. The workbook’s size, formula complexity, add-ins, available memory, and the macro’s design all affect how long a run takes. A quiet or frozen-looking screen is not enough to tell which situation you have.

Look for clues before taking action: does the Excel process show ongoing CPU or disk activity in Task Manager, does the status bar change, or does a progress indicator move? Activity is a reason to wait, not a guarantee that the macro will finish. Little or no activity for a long time can suggest a loop or a wait state, but it is still not conclusive.

What to Do First

  1. Wait briefly and avoid repeated clicks. Clicking the workbook repeatedly or launching Excel again can add queued actions or open extra instances. For a large import, calculation, or report, allow more time than you would for a short formatting macro.
  2. Check for a hidden prompt. Use Alt+Tab on Windows to look for a dialog box, such as a confirmation or file-access prompt, behind Excel. A macro may be waiting for a response. On Mac, use Command+Tab or Mission Control to inspect open windows.
  3. Check system activity. On Windows, press Ctrl+Shift+Esc to open Task Manager and inspect Excel’s CPU and disk activity. Do not interpret one moment’s reading as proof: activity can fluctuate, and Task Manager itself may respond slowly when the computer is under heavy load.
  4. Try to interrupt only if appropriate. If you decide the run is stuck, press Ctrl+Break. Some keyboards require Ctrl+Fn+B or a Break-key combination set by the manufacturer. If Excel offers a prompt to end or debug the macro, choose deliberately; ending it may leave some workbook changes already made.

On Mac, the Windows Ctrl+Break shortcut does not apply. Excel for Mac may respond to Esc or Command+Period to interrupt a running macro, depending on the keyboard and the current state. If neither works, do not assume the workbook is safe to force-quit; consider how much unsaved work is at risk before closing the application.

Recover the Workbook Without Making Things Worse

If Excel becomes responsive again, save a copy under a new name before trying the macro a second time. Use File > Save As and choose a location you can find. If the workbook contains VBA, preserve it in an Excel Macro-Enabled Workbook (*.xlsm); saving as .xlsx removes VBA code. A separate copy also lets you inspect what the interrupted run changed without overwriting the original.

If Excel is still unresponsive, avoid repeatedly clicking the close button. Windows may offer to wait for Excel or close the program. Waiting preserves the chance that a long operation will finish; choosing to close can discard changes that were not saved. If you must end the process, reopen Excel and look for the Document Recovery pane. Excel may offer a recovered version, but recovery is not guaranteed and the latest unsaved edits may be missing.

AutoRecover is intended to save recovery information periodically, not to replace normal saving. Its settings are under File > Options > Save in Excel for Microsoft 365 on Windows. The interval and recovery location can be reviewed there. AutoSave is different: it is available for supported files stored in OneDrive or SharePoint and saves changes to the cloud as you work. Neither feature guarantees that every change made during a stalled macro will be preserved. If the file is cloud-stored, check its version history as another possible recovery route.

Why a Macro Can Freeze Excel

Several common coding patterns can make a macro appear frozen or genuinely run for too long:

  • Excessive cell-by-cell work. Reading or writing worksheet cells one at a time is much slower than processing a range in memory, especially across tens of thousands of rows.
  • Repeated recalculation or screen updates. Writing each value can trigger formula calculations, and selecting or activating cells can force extra interface work.
  • An unintended loop. A loop may fail to update its counter or exit condition, or it may keep searching because the expected value is absent.
  • External waits. A macro may wait on a network location, a database, another application, a file dialog, or a slow data connection.
  • Large or complex workbooks. Volatile formulas, extensive conditional formatting, links, pivots, and add-ins can make otherwise reasonable operations expensive.

For example, a macro that scans 100,000 rows and writes a result into each row can take much longer if every write triggers recalculation. It may not be an Excel defect; the workload and the macro’s interaction with the workbook can be the bottleneck. Conversely, a short macro that previously ran instantly but now stalls after a data-source change deserves investigation rather than simply more waiting.

Improve Long-Running VBA Carefully

For a long loop, DoEvents can let Excel process pending interface events occasionally, so the window may appear more responsive and the user may be able to interrupt the run. It does not make the underlying calculation faster, and frequent calls can add overhead. For substantial data processing, a better design is often to read a range into a VBA array, process values in memory, and write the results back in one operation.

The following illustrative example writes a product for each row on a worksheet named Data. It assumes columns A and B contain numeric values and that column A identifies the last row. Save a separate copy of the workbook before running or changing any macro: VBA changes cannot be undone with Ctrl+Z.

Sub FillProducts()
    Dim ws As Worksheet
    Dim lastRow As Long
    Dim r As Long
    Dim priorScreenUpdating As Boolean

    Set ws = ThisWorkbook.Worksheets("Data")
    priorScreenUpdating = Application.ScreenUpdating
    On Error GoTo CleanUp
    Application.ScreenUpdating = False

    lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
    For r = 2 To lastRow
        ws.Cells(r, "C").Value = ws.Cells(r, "A").Value * ws.Cells(r, "B").Value
        If r Mod 1000 = 0 Then DoEvents ' Allow Excel to process events.
    Next r

CleanUp:
    Application.ScreenUpdating = priorScreenUpdating
    If Err.Number <> 0 Then MsgBox "Macro stopped: " & Err.Description
End Sub

This is a teaching example, not a universal repair. It assumes the sheet exists and the input cells contain numbers; text or errors may require validation. ScreenUpdating is restored even if an error occurs after the handler is set, but calculation mode and events are not changed here. If you modify those application-wide settings in another macro, preserve their original values and restore them on every exit path. DoEvents also permits other events to run, so use it thoughtfully in code that interacts with forms or shared state.

Check Add-Ins, Updates, and the Workbook

If the problem happens with several workbooks or macros, test whether something beyond the specific code is involved. Start Excel in Safe Mode on Windows by opening Run with Windows+R, entering excel /safe, and pressing Enter. If the problem disappears there, an add-in or customization may be contributing. Safe Mode is a diagnostic step, not proof of which component is responsible.

To review add-ins, open File > Options > Add-ins. At the bottom, use the Manage list to select COM Add-ins or Excel Add-ins, choose Go, and disable an item for a test. Change one item at a time so you can identify a connection, then re-enable components you need. If the issue occurs only in one workbook, investigate that file’s formulas, external links, data connections, and macro logic before changing every Excel setting.

On Windows, check for Microsoft 365 updates through File > Account > Update Options > Update Now. Keep a backup before editing VBA or removing workbook components. If the macro is business-critical, produces partial output, or repeatedly freezes Excel, ask the workbook’s owner or a qualified VBA developer to inspect its loop conditions, error handling, data volumes, and external dependencies.

Excel for Mac and Excel for the Web

The steps above primarily describe Excel for Microsoft 365 on Windows. Excel for Mac also runs VBA macros in the desktop application, but its menus, keyboard shortcuts, and interruption behavior differ; use the Mac-specific shortcut guidance above rather than Ctrl+Break. Windows Safe Mode instructions and Windows Task Manager do not apply to Mac. On Mac, Activity Monitor can show whether Excel is consuming system resources, but it cannot tell you whether a particular macro is logically stuck.

Excel for the web cannot create, run, or edit VBA macros. If a workbook’s VBA macro is the cause, open the file in the Excel desktop app to run or troubleshoot that code. A workbook can still contain VBA when viewed in a browser, but the web app is not a substitute for desktop Excel’s VBA environment.

Frequently Asked Questions

Should I wait or force-close Excel? Wait if the macro may still be processing and the workbook contains unsaved work. Check for a hidden dialog and signs of activity first. Force-closing is a last resort because it can lose unsaved changes; recovery may be available afterward, but it is not assured.

Can I stop a macro without closing Excel? On Windows, try Ctrl+Break and respond to any interruption prompt. Some keyboards need a modified Break-key combination. On Mac, try Esc or Command+Period, recognizing that response can vary. An interruption can leave partial changes in the workbook.

Will Ctrl+Z undo a macro? No. Excel clears the normal Undo history when a VBA macro runs, so Ctrl+Z cannot reliably reverse its changes. Restore a saved copy or use a suitable recovered or cloud version instead.

Why does Excel freeze only with one workbook? That file may have more data, expensive formulas, external links, damaged workbook content, or a macro that assumes a particular layout. Compare a copy with a smaller data set and review the macro’s inputs before changing global Excel settings.

Can I run a VBA macro in Excel for the web? No. Open the workbook in desktop Excel for Windows or Mac to run VBA. Excel for the web can display macro-enabled workbooks, but it does not execute their VBA code.

Related

Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.

More in VBA & macros

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.