Excel 2016 for Mac: Step Through VBA Code with the F8 Equivalent
Question details
Find the shortcut to run VBA code one statement at a time in Excel 2016 for Mac.

- 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.
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.
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.
In Excel 2016 for Mac, open Tools > Macro > Visual Basic Editor and select the module containing your macro.
Click inside the VBA procedure you want to debug, or pause the macro at a breakpoint.
Press Shift+Command+I to step into the code. Press it again to execute each subsequent statement.

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.

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.




