I am running a VBA macro and I am getting the error "RUN TIME ERROr 6 OVERFLOW". Attached is the file. Please need help ASAP the subroutine I am running is update sheets();
Skip is right, of course, but that doesn't mean we won't help. Try posting the part of your code that's failing (your debug should tell you), or all of it if it's not too big. Also tell us what you're trying to accomplish.
naikadit, we will try to help/suggest as best as we can. However, it would be a good idea to read the FAQ on getting good answers.
We are not a Help Desk. We are not paid to help anyone. We like to help people, and the people we like to help the most are the people who try to help themselves.
The best way to do that is:
be very clear and explicit
For example, "I am running a VBA macro" is not explicit at all. We have no idea what application you are trying to run the VBA code from. We have no idea if this VBA code is running from one application, but executing actions in another. This kind of information can be crucial.
Most of the time no one here is going to take someone's file and fix it for them. As Skip points out, that is the job of a consultant. Consultants get paid. Consultants do respond (sometimes) to "Please need help ASAP".
I can see you are new here, so welcome to the forum. The more you put into it, the more you will get out of it.
Post some code that we can look at. Make sure you mark the line where the error originates. Use the highlighting tools, or font colors. if you do not know how to do that, please click the "Process TGML" link - it is one of the Step 2 Options[/color red] on the reply screen.
Typically this happens when you work with whole numbers and exceed limit for integers. Without forcing VBA to treat one of numbers as long (&) or double (#) or using longer than integer variable, the result will be assumed as integer:
Code:
' correct
j = 200& * 200
MsgBox j
' overflow
i = 200 * 200
MsgBox i
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.