VBA & Macro Problems

Fix Excel VBA Out-of-Memory Errors on Mac

Amos GikundaAmos Gikunda Nov 18, 2026 869 views

Question details

The user needs to troubleshoot an out-of-memory message that appears while running Visual Basic or Excel VBA on a Mac.

Fix Excel VBA Out-of-Memory Errors on Mac
Product
Microsoft Excel for Mac
Device & OS
Mac
Scenario
Running a VBA macro in an Excel workbook on a Mac.
Observed behavior
Excel displays an out-of-memory message during macro execution.
Before you start

Note which macro and operation trigger the message, along with the workbook size and your Excel version under Excel > About Microsoft Excel. Check whether the error occurs with one workbook or with other workbooks too.

Solution 1Recommended

Free Up Memory and Restart Excel on Mac

Use this first to check whether limited available memory is contributing to the error.

1
Save and close work

Save your open workbooks using File > Save, then quit Excel and any applications you do not need.

2
Check memory pressure

Open Activity Monitor from Applications > Utilities, select the Memory tab, and check whether memory pressure is high.

3
Restart and retest

Reopen Excel and run the macro again. If the error persists, restart your Mac from the Apple menu and test the macro once more.

Free Up Memory and Restart Excel on Mac
Free Microsoft Office alternative

Work With Spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for everyday spreadsheet work. Open Excel files to continue working across office formats, but check macro compatibility before migrating VBA-dependent workflows; WPS does not fix Excel's VBA error.

Open and edit Microsoft Excel XLSX and XLS filesWork with spreadsheet data in a familiar interfaceUse a free, lightweight office suite for everyday tasksMove common document and spreadsheet workflows between office formats
QA img-9

Frequently Asked Questions

How can I find the Excel version on my Mac?

Open Excel and choose Excel > About Microsoft Excel. Record the version when investigating or reporting the error.

How do I find the VBA line causing the error?

If the error dialog offers Debug, select it to view the highlighted line in the Visual Basic Editor. Otherwise, open Tools > Macro > Visual Basic Editor and inspect the procedure that was running.

Can a large workbook cause a VBA out-of-memory error?

A large workbook or macro that loads a lot of data into arrays can increase memory use. Try processing smaller ranges or batches and retest the macro.

How do I check whether an add-in is involved?

Open Tools > Excel Add-ins, disable the selected add-ins, restart Excel, and rerun the macro. If the error stops, enable the add-ins one at a time to identify a possible cause.

Will WPS Office fix an Excel VBA memory error?

No. WPS Office is an alternative for working with spreadsheets, not a fix for Microsoft Excel's VBA error. Check macro compatibility before moving a VBA-dependent workbook.