Max length of variable name?
On Mon, 12 Apr 2010 11:39:01 -0700, David
wrote:
Hi,
The variables contain numbers.
The problem I had:
Tolerance = GrossTotal * 0.01 (This came out to about 1000)
TargetMMktPercent = ActiveCell.Offset(56, 0).Value
TargetMMkt = TargetMMktPercent * GrossTotal
TargetMMktHi = TargetMMkt + Tolerance
TargetMMktLo = TargetMMkt - Tolerance
(The last 2 statements had the same values and I had to change then to:
TargetMHi = TargetMMkt + Tolerance
TargetMLo = TargetMMkt - Tolerance
to get different values)
Thus the question about the length of a variable name, which if allowed 256
characters does not seem to make sense.
This did work:
Sub foo()
x = 1
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = 2
Debug.Print x & " " & xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
End Sub
Thanks
--
1. You still haven't provided any information I can see as to why you think a
variable name is too long. Are you getting an error message? Unexpected
result? System crash? etc. If so, what is the nature of the error message
(what does it say) or other dysfunction.
2. How are your variables DIM'd?
3. Where do the values for these variables come from -- How did the numbers
get into them?
We really can't read minds, so the more information you can provide, the easier
it is to help you.
--ron
|