VBA & Macro Problems

Excel 2016 for Mac: Step Through VBA Code with the F8 Equivalent

Khadija KhanKhadija Khan Nov 27, 2026 869 views

Question details

Find the shortcut to run VBA code one statement at a time in Excel 2016 for Mac.

Excel 2016 for Mac VBA Debugging: The F8 Equivalent
Product
Microsoft Excel 2016 for Mac
Device & OS
Mac, macOS
Scenario
The user wants to debug a VBA macro by stepping through its code.
Observed behavior
F8 does not step through the code, even when standard function keys are enabled.
Before you start

Open the workbook containing the macro, then open its code in the Visual Basic Editor. Place the cursor inside the procedure you want to debug.

Solution 1Recommended

Use Shift+Command+I to step through VBA code

Use this Mac shortcut to execute VBA statements one at a time when F8 does not work.

1
Open the VBA editor

In Excel 2016 for Mac, open Tools > Macro > Visual Basic Editor and select the module containing your macro.

2
Select the procedure

Click inside the VBA procedure you want to debug, or pause the macro at a breakpoint.

3
Step through the code

Press Shift+Command+I to step into the code. Press it again to execute each subsequent statement.

Use Shift+Command+I to step through VBA code
Menu alternative: In the Visual Basic Editor, you can also choose Debug > Step Into to execute code one statement at a time.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface for opening and editing spreadsheets. Its compatibility with common Office formats helps you move existing files into WPS. For the Excel-specific VBA debugging shortcut, continue using Microsoft Excel.

Open and edit spreadsheets in WPS SpreadsheetsCompatible with common Microsoft Office formats, including XLSX, DOCX, and PPTXUse a familiar interface to ease the transition from Microsoft OfficeAccess a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

What is the F8 equivalent for VBA debugging in Excel 2016 for Mac?

In the Visual Basic Editor, press Shift+Command+I to step through VBA code one statement at a time.

Can I step through a macro without using a keyboard shortcut?

Yes. In the Visual Basic Editor, place the cursor inside the procedure or pause at a breakpoint, then choose Debug > Step Into.

Where do I open VBA code in Excel 2016 for Mac?

Open the workbook, then choose Tools > Macro > Visual Basic Editor. Select the module containing the macro you want to inspect.