Are ranges in VBA not accepting Double declared value?

I have the following code where I pick a value from a named range and store it in a variable declared as a Double. Later on, after changing the variable or not I want to reassign it to the named range. But here I get an Overflow error. The error disappears if I change the variable into an Integer. For information, I am working on a Mac.


Dim maxDepth As Double

Do Until Range("scopeID").offset(i, 0) = ""
    maxDepth = Range("currentDepth").offset(i, 0)

    ' some code here that possibly changes the value based on some conditions

    Range("currentDepth").offset(i, 0) = maxDepth
    i = i + 1


How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum