Quote Originally Posted by dilettante View Post
The Val() function should be avoided anyway. It is obsolete and has side-effects that can be harmful unless you intentionally want these side effects.

It is almost always better to use one of the "grown up" conversion functions such as CLng(), CInt(), etc. that were meant to replace crusty old and slow Val(), which is really only in VB6 at all to make it easier to port old MS Basic code to VB6.
The other numeric conversion methods are all locale aware.
I need to deal with a lot of text based data files in which numeric values are stored in the "US" format, that is with a decimal point.
So I always use Val() function to parse these values.
I wrote my own CStrVal() funtion which is also locale aware to write numeric values in these data files.