Forum Discussion
Runtime error 6 overflow with Dim Double. MacOS Catalina - Excel 2019 - VBA 7.1
A similar problem is discussed here in this https://answers.microsoft.com/en-us/msoffice/forum/all/run-time-error-6-overflow-in-excel-vba/1f38291a-26ca-4b28-8c76-8b18b5cf0963.
Haytham AmairahThank you for your answer. But my problem is not the same because I receive the error message of overflow even with that little program:
Sub test()
Dim a As Double
a = 20.3
End Sub
Error message in the third line.
As I read in an other chat, this program runs well on a Windows Computer but not on the Mac.
- PeterGallinSep 05, 2019Copper Contributor
PeterGallinI have found a temporary solution of the mentioned problem:
Sub Test()
Dim a As Variant
a = 20.3
End Sub
- Stefan1635Dec 20, 2022Copper Contributor
PeterGallinyou made my day.
This is one of the "Traffic-light" errors ("On-Off-On-Off") that escort us thru Office Versions on MacOS since 2004. If you think some version is clean, the next update brings the bug back.
- FabioTMCaldasApr 14, 2021Copper Contributorthanks, it's solved the issue on Mac
- PeterGallinApr 14, 2021Copper ContributorI am surprised that such a long time there is an answer on my problem. But now I would like to know how the problem is solved. Is there a new update for Microsoft Excel? (I do not want to change the operating system on my mac.)
- Haytham AmairahAug 31, 2019Silver Contributor
I've tested your code in my Windows machine, and it works without errors!
It seems that there are some issues related to the Mac version of Excel.
I think this https://answers.microsoft.com/en-us/msoffice/forum/all/excel-for-mac-vba-runtime-error-6/afd8d0de-4458-4820-b6c0-711abdf463b7 would be more helpful!
Regards
- PeterGallinAug 31, 2019Copper Contributor
Haytham AmairahThank you again for your test. I am shure now that there is a problem with Excel on Mac and even the newest version on an brandnew MacBook 12". I had a chat with a Microsoft Expert yesterday and he promised me to contact the developpers so that there will be the solution in the next update. I hope ...
- Stefan1635Dec 20, 2022Copper Contributor
For chinese characters to be displayed correctly in formula results, it took MS from Office4Mac2004 (2005) to Office 365(around 2020). They are only 200 developers there, so be patient. But they finally will do it. :-DDD