Share via

Step Over (Shift + F8) in EXCEL/VBA not doing what it should

DavidForfar-1090 20 Reputation points
2026-05-21T09:34:26.57+00:00

Step Over function (Shift + F8) in Excel/VBA nor working as should

Microsoft 365 and Office | Excel | For business | Windows

Answer accepted by question author

AI answer

2026-05-21T09:34:41.5366667+00:00

In the Excel VBA editor, Shift+F8 is the Step Over command, but it only works as expected when code execution is already in break mode and the current line is executable VBA code.

Key points to check:

  1. Confirm the correct environment
    • Shift+F8 as Step Over applies in the VBA editor, not in the Excel grid.
    • In the worksheet, Shift+F8 has a different meaning (add to selection) and will not control VBA execution.
  2. Ensure code is actually running and in break mode
    Step Over works only when there is a current execution point:
    • Start code with F5 (Run Sub/UserForm) or F8 (Step Into) from the VBA editor.
    • Execution must stop at a breakpoint, an error, or the first line of a procedure.
    • When in break mode, the current line is highlighted. Only then will Shift+F8 execute that line and move to the next line in the same procedure.
  3. Understand what Step Over does
    According to the Debug menu:
    • Step Into (F8): executes one statement at a time and steps into called procedures.
    • Step Over (Shift+F8): if the current line calls another procedure, that entire procedure is executed as a unit and the debugger moves to the next line in the current procedure, instead of stepping inside the called procedure. It is available only in break mode.
    • Step Out (Ctrl+Shift+F8): runs the rest of the current procedure and returns to the caller.
  4. Verify the shortcut is not being intercepted
    • In Excel proper, Shift+F8 is used to add to a selection. If focus is not in the VBA editor’s Code window, Excel’s shortcut will take precedence and debugging will not step.
    • Click inside the VBA Code window first, then press Shift+F8.
  5. Use menu/toolbar to confirm behavior
    • In the VBA editor, open the Debug menu and choose Step Over. If this works but Shift+F8 does not, the keyboard shortcut may be blocked by something external (e.g., OS-level shortcut).
    • If neither the menu command nor Shift+F8 works, code is likely not in break mode or there is no current execution point.
  6. Typical working sequence
    1. Open the VBA editor (Alt+F11).
    2. Set a breakpoint on a line (F9).
    3. Run the procedure (F5). Execution stops at the breakpoint.
    4. Press Shift+F8 to Step Over each line, especially lines that call other procedures.

If these conditions are met—focus in the VBA editor, code in break mode, and an executable line highlighted—Shift+F8 will perform Step Over as designed.


References:

AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. DavidForfar-1090 20 Reputation points
    2026-05-21T09:47:09.0466667+00:00

    Have accepted AI answer - thank you.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.