Forum Discussion
isabelaj
Aug 02, 2019Copper Contributor
Runtime error 6 overflow with Dim Double. MacOS Catalina - Excel 2019 - VBA 7.1
PeterGallin
Aug 30, 2019Copper Contributor
I have exactly the same problem as isabelaj: When I declare a variable as double I cannot assign any value to that variable. It results always the overflow error message.
Haytham Amairah
Aug 31, 2019Silver Contributor
- PeterGallinAug 31, 2019Copper Contributor
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.
- 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 thread 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 ...