Hello Howard,
All variables are Dim'ed As Double. But that probably doesn't matter.
The part that is baffling about this is that exactly one instance if CStr is
required in the place shown, while the other three have to be Str. Other
variations do not work.
The only reason I can think of why this might be is maybe that the X values
can be text for certain excel chart types, but the Y values can't, thus
excel processes their values using different rules upon input (here the
chart type is XY Scatter).
Do you know if this the case?
Thanks,
Brian
"Howard Kaikow" wrote in message
...
If xmx and ymx are variants, I expect that they are getting stored as
numbers.
CStr and Str convert them to strings.
--
http://www.standards.com/; See Howard Kaikow's web site.
"Brian Murphy" wrote in message
...
Hello Excel NewsGroup,
I've run across a strange behavior in excel (2000 and XP) when running on
a
system with a non-english installation. When running the following code,
a
chart series is the current Selection, and I am trying to change its
definition to display specific hardwired points.
xmn = 0
xmx = 1.1
ymn = 0
ymx = 1.1
With Selection
.XValues = CStr(xmn) & "," & Str(xmx)
.Values = Str(ymn) & "," & Str(ymx)
End With
In the above code, I found that the CStr and Str function calls are
required
to get the correct result. Does anyone know why CStr seems to be
required?
Thanks,
Brian Murphy
Austin, Texas