I cannot find it in options.
This is because it is a runtime error, not an "option."
Most likely a cause of an Overflow error is trying to slick a number that's too huge for the data type.
Byte
type is for 0-255. Integer
type can hold numbers up to 32,767. Long
data type can hold numbers up to 2,147,483,647 so it's probably better suitable for your specific case.
Adjust your variables types accordingly.
Generally, VBA converts all Integers
to Long
these days so it's a better practice to dim your variables as Long
by default.
Here is an excellent writup as to why you should use them as Long.