Home

Runtime error 6 overflow with Dim Double. MacOS Catalina - Excel 2019 - VBA 7.1

%3CLINGO-SUB%20id%3D%22lingo-sub-786433%22%20slang%3D%22en-US%22%3ERuntime%20error%206%20overflow%20with%20Dim%20Double.%20MacOS%20Catalina%20-%20Excel%202019%20-%20VBA%207.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-786433%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20980px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125475iC81F46A0A7CE24FC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Screen%20Shot%202019-08-02%20at%2011.50.28%20AM.png%22%20title%3D%22Screen%20Shot%202019-08-02%20at%2011.50.28%20AM.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20826px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125470iC2B13ADA4B4B3521%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Screen%20Shot%202019-08-02%20at%2011.52.02%20AM.png%22%20title%3D%22Screen%20Shot%202019-08-02%20at%2011.52.02%20AM.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20882px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125473iE84141670105D610%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Screen%20Shot%202019-08-02%20at%2011.51.15%20AM.png%22%20title%3D%22Screen%20Shot%202019-08-02%20at%2011.51.15%20AM.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20600px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125471i09D21E22F2AF14CF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Screen%20Shot%202019-08-02%20at%2011.50.59%20AM.png%22%20title%3D%22Screen%20Shot%202019-08-02%20at%2011.50.59%20AM.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-786433%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-786572%22%20slang%3D%22en-US%22%3ERe%3A%20Runtime%20error%206%20overflow%20with%20Dim%20Double.%20MacOS%20Catalina%20-%20Excel%202019%20-%20VBA%207.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-786572%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F386579%22%20target%3D%22_blank%22%3E%40isabelaj%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20provide%20some%20useful%20info%20about%20the%20problem!%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EThe%20visible%20part%20of%20the%20code%20in%20the%20first%20screenshot%20doesn't%20seem%20to%20have%20an%20error!%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EHowever%2C%20the%20Overflow%20error%20is%20one%20of%20the%20most%20popular%20runtime%20errors%20in%20VBA%2C%20please%20check%20out%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Foffice%2Fvba%2Flanguage%2Freference%2Fuser-interface-help%2Foverflow-error-6%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edocumentation%20article%3C%2FA%3Eto%20learn%20move%20about%20it%20and%20how%20to%20fix%20it.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3ERegards%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-831959%22%20slang%3D%22de-DE%22%3ERe%3A%20Runtime%20error%206%20overflow%20with%20Dim%20Double.%20MacOS%20Catalina%20-%20Excel%202019%20-%20VBA%207.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-831959%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20exactly%20the%20same%20problem%20as%20isabelaj%3A%20When%20I%20declare%20a%20variable%20as%20double%20I%20cannot%20assign%20any%20value%20to%20that%20variable.%20It%20results%20always%20the%20overflow%20error%20message.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-832127%22%20slang%3D%22en-US%22%3ERe%3A%20Runtime%20error%206%20overflow%20with%20Dim%20Double.%20MacOS%20Catalina%20-%20Excel%202019%20-%20VBA%207.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-832127%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F397765%22%20target%3D%22_blank%22%3E%40PeterGallin%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20similar%20problem%20is%20discussed%20here%20in%20this%20%3CA%20href%3D%22https%3A%2F%2Fanswers.microsoft.com%2Fen-us%2Fmsoffice%2Fforum%2Fall%2Frun-time-error-6-overflow-in-excel-vba%2F1f38291a-26ca-4b28-8c76-8b18b5cf0963%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elink%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-832283%22%20slang%3D%22de-DE%22%3ERe%3A%20Runtime%20error%206%20overflow%20with%20Dim%20Double.%20MacOS%20Catalina%20-%20Excel%202019%20-%20VBA%207.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-832283%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3EThank%20you%20for%20your%20answer.%20But%20my%20problem%20is%20%3CSTRONG%3Enot%3C%2FSTRONG%3Ethe%20same%20because%20I%20receive%20the%20error%20message%20of%20overflow%20even%20with%20that%20little%20program%3A%3C%2FP%3E%3CP%3ESub%20test()%3C%2FP%3E%3CP%3EDim%20a%20As%20Double%3C%2FP%3E%3CP%3Ea%20%3D%2020.3%3C%2FP%3E%3CP%3EEnd%20Sub%3C%2FP%3E%3CP%3EError%20message%20in%20the%20third%20line.%3C%2FP%3E%3CP%3EAs%20I%20read%20in%20another%20chat%2C%20this%20program%20runs%20well%20on%20a%20Windows%20Computer%20but%20not%20on%20the%20Mac.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-832293%22%20slang%3D%22en-US%22%3ERe%3A%20Runtime%20error%206%20overflow%20with%20Dim%20Double.%20MacOS%20Catalina%20-%20Excel%202019%20-%20VBA%207.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-832293%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F397765%22%20target%3D%22_blank%22%3E%40PeterGallin%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tested%20your%20code%20in%20my%20Windows%20machine%2C%20and%20it%20works%20without%20errors!%3C%2FP%3E%3CP%3EIt%20seems%20that%20there%20are%20some%20issues%20related%20to%20the%20Mac%20version%20of%20Excel.%3C%2FP%3E%3CP%3EI%20think%20this%20%3CA%20href%3D%22https%3A%2F%2Fanswers.microsoft.com%2Fen-us%2Fmsoffice%2Fforum%2Fall%2Fexcel-for-mac-vba-runtime-error-6%2Fafd8d0de-4458-4820-b6c0-711abdf463b7%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethread%3C%2FA%3Ewould%20be%20more%20helpful!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-832315%22%20slang%3D%22de-DE%22%3ERe%3A%20Runtime%20error%206%20overflow%20with%20Dim%20Double.%20MacOS%20Catalina%20-%20Excel%202019%20-%20VBA%207.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-832315%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3EThank%20you%20again%20for%20your%20test.%20I%20am%20shure%20now%20that%20there%20is%20a%20problem%20with%20Excel%20on%20Mac%20and%20even%20the%20newest%20version%20on%20an%20brandnew%20MacBook%2012%22.%20I%20had%20a%20chat%20with%20a%20Microsoft%20Expert%20yesterday%20and%20he%20promised%20me%20to%20contact%20the%20developpers%20so%20that%20there%20will%20be%20the%20solution%20in%20the%20next%20update.%20I%20hope%20...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-837742%22%20slang%3D%22de-DE%22%3ERe%3A%20Runtime%20error%206%20overflow%20with%20Dim%20Double.%20MacOS%20Catalina%20-%20Excel%202019%20-%20VBA%207.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-837742%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F397765%22%20target%3D%22_blank%22%3E%40PeterGallin%3C%2FA%3EI%20have%20found%20a%20temporary%20solution%20of%20the%20mentioned%20problem%3A%3C%2FP%3E%3CP%3ESub%20Test()%3C%2FP%3E%3CP%3EDim%20a%20As%20Variant%3C%2FP%3E%3CP%3Ea%20%3D%2020.3%3C%2FP%3E%3CP%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
isabelaj
Occasional Visitor
7 Replies
Highlighted

@isabelaj

 

Hi,

 

Please provide some useful info about the problem! 

The visible part of the code in the first screenshot doesn't seem to have an error!

 

However, the Overflow error is one of the most popular runtime errors in VBA, please check out this documentation article to learn more about it and how to fix it.

 

Regards

@Haytham Amairah 

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.

@PeterGallin

 

A similar problem is discussed here in this link.

@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.

 

@PeterGallin

 

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

@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 ...

@PeterGallinI have found a temporary solution of the mentioned problem:

Sub Test()

Dim a As Variant

a = 20.3

End Sub

 

Related Conversations
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
PacketMon Components are not loading in WAC 1909
HotCakeX in Windows Admin Center on
2 Replies