A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
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:
- 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.
- 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.
- 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.
- 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.
- 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.
- Typical working sequence
- Open the VBA editor (Alt+F11).
- Set a breakpoint on a line (F9).
- Run the procedure (F5). Execution stops at the breakpoint.
- 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: