VBA & Macro Problems

How to Fix Excel VBA Macro Crashing on Mac But Working on Windows

Phi Hung VoPhi Hung Vo Oct 28, 2026 869 views

Question details

A complex Excel macro workbook crashes on Mac with an EXC_BAD_ACCESS error but functions correctly on a Windows PC.

How to Fix Excel VBA Macros Crashing on Mac but Working on Windows
Product
Microsoft Excel
Device & OS
Mac (macOS)
Scenario
Running complex VBA macros or clicking specific macro-assigned buttons within a workbook on a Mac.
Observed behavior
Excel crashes unexpectedly, often returning an EXC_BAD_ACCESS error, preventing the user from generating results or utilizing the macro functions.
Before you start

Ensure that your Mac is plugged in and save a backup copy of your macro-enabled workbook (.xlsm) before testing or modifying any VBA code.

Solution 1Recommended

Update macOS and Microsoft 365 to the Latest Versions

System and software updates often contain critical patches for EXC_BAD_ACCESS errors and macro execution bugs on Mac.

Many memory access errors (like EXC_BAD_ACCESS) are tied to specific bugs in the macOS environment or Office for Mac builds. Updating to macOS 12.2.1 or later and ensuring Microsoft 365 is fully updated often resolves baseline stability issues.

1
Update macOS

Click the Apple menu > System Settings (or System Preferences) > General > Software Update, and install any pending updates to reach version 12.2.1 or newer.

2
Update Excel for Mac

Open Microsoft Excel, click Help in the top menu bar, select Check for Updates, and install the latest available Microsoft 365 updates.

3
Relaunch and Test

Restart your Mac, open the workbook, and test the specific buttons (e.g., 'Generate Results') on the INPUT or OUTPUT sheets to see if the crash persists.

Update macOS and Microsoft 365 to the Latest Versions
Update Delays: Sometimes an update requires a full system reboot or multiple attempts to properly configure. If the crash persists immediately after updating, try restarting the Mac once more.
Free Microsoft Office alternative

Try WPS Office for a Seamless Spreadsheet Experience

If Microsoft Excel continues to crash on your Mac due to complex macro compatibility issues, consider switching to WPS Office. It is a highly compatible, lightweight, and free alternative that handles complex spreadsheets effortlessly without burdening your system.

  1. 1. Download and Install: Visit the official WPS website and download the free WPS Office suite for Mac.
  2. 2. Open Your Workbook: Launch WPS Spreadsheets and open your .xlsm or .xlsx file to view and edit your data seamlessly.
  3. 3. Enjoy High Compatibility: Experience high compatibility with Excel files and a familiar tabbed interface without the heavy resource usage of Microsoft Office.
Fully compatible with Microsoft Excel formats (.xlsx, .xlsm, .csv).Lightweight installation that runs smoothly on both Mac and Windows.Familiar user interface requiring no learning curve.Built-in tabbed workspace to manage multiple documents easily.
microsoft office alternative - wps office

Frequently Asked Questions

Why do Excel macros work on Windows but crash on Mac?

Excel for Mac operates in a 'sandboxed' environment and uses a different underlying architecture than Windows. Features like ActiveX controls, COM add-ins, and specific Windows API calls are not supported on macOS, causing macros relying on them to fail or crash.

What does the EXC_BAD_ACCESS error mean in Excel for Mac?

This error indicates that Excel attempted to access a memory block it shouldn't have or that the memory is corrupted. In the context of VBA, it usually happens when a macro tries to execute a Windows-specific command or component that is missing on Mac.

How do I make my Excel macros compatible with both Mac and Windows?

To ensure cross-platform compatibility, avoid using ActiveX controls and Windows-specific API calls. Instead, use standard Form Controls and Mac-compatible AppleScript equivalents where necessary, or use conditional compilation (#If Mac Then ... #Else ... #End If) in your VBA code.

Can I run Windows Excel on my Mac to avoid these macro crashes?

Yes, if a workbook strictly requires Windows-only VBA features, you can run the Windows version of Excel on your Mac using virtualization software like Parallels Desktop, VMware Fusion, or by booting into Windows via Boot Camp.