VBA & Macro Problems

Fix Excel VBA F5 Running Like F8 in the Visual Basic Editor

John WilsonJohn Wilson Nov 13, 2026 869 views

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.

Why Excel VBA F5 Runs Like F8 in the Visual Basic Editor
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the Visual Basic Editor

In Excel, press Alt+F11, or click the Developer tab and then click Visual Basic.

2
Reset the current execution

Click the Reset button (blue square) on the VBE toolbar, or choose Run > Reset to stop break mode.

3
Clear all breakpoints

Go to Debug > Clear All Breakpoints or press Ctrl+Shift+F9, then confirm no red breakpoint circles or highlighted lines remain.

4
Run the procedure again

Place the cursor inside a simple Sub procedure and press F5, or choose Run > Run Sub/UserForm, to test normal execution.

Reset the VBE Execution State and Clear All Breakpoints
Expected result: F5 should run the macro to completion instead of stepping through each line.
Free Microsoft Office alternative

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.

Avoid Excel VBA Editor F5 stepping issues by using WPS Office for everyday spreadsheet and macro tasksOpens, edits, and saves Microsoft Excel .xls, .xlsx, and macro-enabled .xlsm filesLightweight and easy to install, with a familiar ribbon UI that reduces migration effortFree alternative that keeps your Excel-compatible work accessible without expensive Office repairs
microsoft office alternative - wps office

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.