Fix Excel VBA F5 Running Like F8 in the Visual Basic Editor
Question details
The user needs to restore the normal Run behavior in the Excel Visual Basic Editor so that F5 and Ctrl+F8 run a macro instead of stepping through it line by line.

- Product
- Microsoft Excel Visual Basic Editor (VBA)
- Device & OS
- not provided
- Scenario
- While working with a VBA macro, the user presses F5, Ctrl+F8, or clicks the toolbar Run button and expects the procedure to execute normally.
- Observed behavior
- The editor behaves like F8 and steps through the code line by line, even when using toolbar buttons, which makes a physical keyboard fault unlikely.
Close other workbooks that contain VBA projects and open only the affected workbook. In the Visual Basic Editor, check the title bar to confirm the active module and make sure the editor is not paused in break mode before you test F5.
Reset the VBE Execution State and Clear All Breakpoints
Use this first because break mode or lingering breakpoints are the most common reasons F5 steps through code instead of running.
When the Visual Basic Editor is in break mode, it pauses execution and can behave like Step Into (F8). Resetting the editor and clearing breakpoints returns it to a clean run state.
In Excel, press Alt+F11, or click the Developer tab and then click Visual Basic.
Click the Reset button (blue square) on the VBE toolbar, or choose Run > Reset to stop break mode.
Go to Debug > Clear All Breakpoints or press Ctrl+Shift+F9, then confirm no red breakpoint circles or highlighted lines remain.
Place the cursor inside a simple Sub procedure and press F5, or choose Run > Run Sub/UserForm, to test normal execution.

Run a Simple Macro from the Correct Module
Use this if the reset and breakpoint cleanup do not help or if the active module is not the one that contains the macro.
Disable VBA Add-ins and Repair Microsoft Office
Use this only after the VBE reset, breakpoint cleanup, and test macro steps fail, because the issue may be caused by a VBA add-in or damaged Office installation.
Switch to WPS Office Free When Excel VBA Editor F5 Sticks in Step Mode
If the Excel Visual Basic Editor keeps stepping through macros, WPS Office offers a free, lightweight spreadsheet alternative that supports Excel file formats and provides a familiar Office-style interface for smooth migration.

Frequently Asked Questions
Why does F5 step through the Excel VBA code instead of running it?
This usually happens because the Visual Basic Editor is in break mode, a breakpoint is still active, or the cursor is not inside a valid procedure. Press Run > Reset, go to Debug > Clear All Breakpoints, and then click inside a simple Sub before pressing F5.
The same problem occurs when I click the Run button. Is it a keyboard issue?
Probably not. If toolbar Run also steps through code, the editor itself is in a stepping or paused state. Reset the VBE, clear breakpoints, and test in a new workbook.
How do I clear breakpoints in the Excel Visual Basic Editor?
Open the Visual Basic Editor with Alt+F11, then click Debug > Clear All Breakpoints or press Ctrl+Shift+F9. Check that no red circles or highlighted lines remain in the code.
What should I do if resetting the VBE and clearing breakpoints does not fix F5?
Run a test macro from the correct module, disable VBA add-ins in Add-Ins > Add-In Manager, and repair Microsoft Office through Control Panel > Programs and Features. Test again in a new workbook.
Can WPS Office run Excel VBA macros if Excel keeps stepping through them?
WPS Office supports Excel macro-enabled workbooks in compatible versions. If the Excel VBA editor becomes unreliable, WPS Office is a free alternative for opening and working with .xls, .xlsx, and .xlsm files.




