Unexplained change in variable
Hi,
AB's suggestion for the Dim statement fixed the problem. I still do not know
why with as many variables as there are and none, other than these 2 having
been DIM'ed that it was necessary?
If anyone has some insight, I would like to know.
Thanks,
--
David
"ker_01" wrote:
"passing your variable (TotalValue) ByRef and not
ByVal" this is not happening anywhere.
Just because you didn't explicitly force it doesn't mean that it isn't
happening accidently. Again, since you seem unwilling to post any relevant
code, you probably won't get a concrete answer, at least not without more
back-and-forth.
Is all 11 pages of your code in one sub, or do you have multiple subs that
call each other? Are you passing any parameters (and specifically, either of
these 2 variables) among any of your subs, including other than the sub where
this code is located? If so, consider posting your Sub statement(s) and
associated parameter declaration(s)
"David" wrote:
Hello Again,
I did try to Dim these two values and it made the difference. They are the
only 2 that are Dim-ed. I still am not sure why I had to do this, but it did
worked.
Any idea why?
Thanks,
--
David
"ker_01" wrote:
"AB" wrote:
From the top of my head the first reason that would come to my mind is
that somewhere in your code you're passing your variable (TotalValue)
ByRef and not ByVal and that makes the two variables being pretty much
one variable (when one changes, so does the other.
That would make sense...
|