VBA & Macro Problems

How to Run Excel VBA Macros Step-by-Step on Mac

Camila MilosovichCamila Milosovich Nov 11, 2026 868 views

Question details

The user wants to know the Mac keyboard shortcut and method to execute a VBA macro one line at a time in the Visual Basic Editor.

How to Run an Excel VBA Macro Step-by-Step on Mac
Product
Microsoft Excel for Mac
Device & OS
macOS
Scenario
Debugging VBA code to find errors or to understand the execution flow line-by-line.
Observed behavior
Needs to execute code incrementally instead of running the entire macro script at once.
Before you start

Ensure you have the Developer tab enabled in your Excel ribbon and have a VBA macro script ready to debug in the Visual Basic Editor.

Solution 1Recommended

Use the Mac Keyboard Shortcut for Step-by-Step Execution

The quickest and most efficient way to step into and run VBA code line-by-line on a Mac is by using the dedicated debugging keyboard shortcut.

While Windows users rely on the F8 key, the Mac version of Excel has a specific combination for stepping into VBA code. Memorizing this shortcut will significantly speed up your debugging process.

1
Open Visual Basic Editor

Launch Microsoft Excel, navigate to the Developer tab, and click on 'Visual Basic' to open the Visual Basic Editor (VBE).

2
Position Your Cursor

In the code module, click to place your text cursor anywhere inside the VBA procedure (macro) you want to debug.

3
Execute Step-by-Step

Press Shift+Command+I on your Mac keyboard. The first line of the macro will be highlighted in yellow. Continue pressing Shift+Command+I to execute the code one line at a time.

Use the Mac Keyboard Shortcut for Step-by-Step Execution
Debugging Tip: As you step through the code, you can hover your mouse cursor over variables to see their current values in real-time.
Free Microsoft Office alternative

Looking for a Lightweight Spreadsheet Alternative?

While running complex VBA macros is a Microsoft Excel-specific feature, many users find that their everyday spreadsheet data analysis and formatting needs are perfectly met by a lighter, faster alternative. WPS Office offers a powerful spreadsheet tool completely free of charge.

  1. 1. Download: Visit the official WPS Office website and download the installer for Mac.
  2. 2. Install: Open the downloaded package and drag the WPS Office icon to your Applications folder.
  3. 3. Start Creating: Launch WPS Spreadsheet and instantly open your existing Excel workbooks.
Seamlessly open, edit, and save Microsoft Excel (.xlsx, .xls) filesLightweight architecture ensures fast performance and quick loading on MacFamiliar spreadsheet interface reduces the learning curveFree alternative for advanced data analysis and visualization without expensive subscriptions
microsoft office alternative - wps office

Frequently Asked Questions

Why is 'Step Into' grayed out in the Debug menu?

The 'Step Into' option may be disabled if a macro is currently running, if there is a syntax error preventing the code from compiling, or if your cursor is not placed inside a valid Sub or Function procedure.

What is the Windows equivalent shortcut for stepping through VBA code?

On a Windows PC, you can press the F8 key to step through VBA macro code line by line, whereas on a Mac, the corresponding shortcut is Shift+Command+I.

How do I stop a macro that is running step-by-step?

To stop the debugging process, go to the Run menu in the Visual Basic Editor and click 'Reset', or press the square Stop (Reset) button on the standard toolbar at the top of the window.