Hi Rick,
Application.DecimalSeparator returns
the relevant Windows setting. However,
it is an (Excel) application property and
would not be recognised, say, by Word
VBA.
In my previous response I omitted to
compliment you on the fact that you actively
address potential international issues, so I am
happy to rectify that now.
---
Regards.
Norman
"Rick Rothstein (MVP -
VB)" wrote in
message ...
Yeah, a carry-over from my compiled VB days (as was the code also).
The help files are not completely clear to me... does the DecimalSeparator
property apply to the VBA world as well, or only to the worksheet world?
The Format function call I offered returns the Windows decimal separator,
period, not Excel's whereas I presume the DecimalSeparator property
returns the decimal separator being used on the worksheet (which usually
would be the same as Windows, but not necessarily). I know there is a
UseSystemSeparators property which can be set to False to force the
worksheet to use Windows decimal separator even if Excel's is different;
but, again, does this extend into the VBA world as well?
Rick
"Norman Jones" wrote in message
...
Hi Rick,
One very small point:
=============
[...]
In keeping with the non-APIness of this solution, here is what I use to
get the system's decimal point.
DecimalPointSymbol = Format$(0, ".") [...]
=============
Perhaps, alternatively:
DecimalPointSymbol = Application.DecimalSeparator
---
Regards.
Norman