Fix VBA Run-time Error 6 Overflow with Double Assignment in Excel for Mac
Question details
Users encounter a run-time error 6 (Overflow) in VBA when assigning a simple value like 10 to a Double variable.

- Product
- Excel for Mac
- Device & OS
- macOS Ventura
- Scenario
- Running or debugging VBA macros involving Double variable assignments on a Mac.
- Observed behavior
- VBA throws a run-time error 6 (Overflow) even for small values like 10, particularly when interacting with the debugger or using Debug.Print statements.
Ensure you have saved your macro code and verify whether you are participating in the Office Insider Beta channel, as this is a known bug in specific beta builds of Excel for Mac.
Update Excel to the Latest Build and Report Feedback
Since this is an unexpected bug often tied to beta builds of Excel for Mac, updating to a newer release or reporting it to Microsoft is the primary resolution.
Open Excel on your Mac, click on 'Help' in the top menu bar, and select 'Check for Updates' to install the latest available stable or beta build.
If the error persists after updating, click 'Help' > 'Feedback' > 'I Don\'t Like Something' to report the issue directly to Microsoft.
In your feedback report, include a reproducible sample of your VBA code and your exact Excel build information to help developers isolate the bug.

Apply VBA Code Workarounds
Modify your VBA code slightly to bypass the debugger interaction that triggers the overflow error.
Experience Stable Spreadsheet Operations with WPS Office
If beta channel bugs in Microsoft Excel for Mac disrupt your workflow, consider using WPS Office. It offers a highly compatible, free, and lightweight alternative for your daily spreadsheet and data analysis needs.

Frequently Asked Questions
Why does a value of 10 cause an Overflow error in VBA?
In standard VBA, a Double variable can easily handle a value of 10. The Overflow error in this specific scenario is not a real mathematical overflow but a known bug in certain beta builds of Excel for Mac, often triggered by the VBA debugger.
Does this Overflow error occur with other variable types?
No. Based on user reports, this specific debugger bug only triggers when assigning values to Double variables. Using Variant or Long variables for the same value does not produce the run-time error 6.
How can I avoid this error without changing my Excel channel?
You can often bypass the error by removing 'Debug.Print' statements immediately preceding the assignment, or by adding a 'DoEvents' command right before the Double variable assignment in your code to prevent the debugger conflict.




