The Val() function doesn't recognize system-wide decimal point

decimal-point, ms-access, number-formatting, vba

Solution

According to the documentation:

Note The `Val` function recognizes only the period (`.`) as a valid decimal separator. When different decimal separators are used, as in international applications, use `CDbl` instead to convert a string to a number.

Note: `Val(7,3)+1,4` also returns `8,4`, so be careful if your input already is in the number format!

Problem

The `val()` function seems to understand `.` as a decimal point, even on systems with `,` as a decimal point. For example, the following call ``` val("7,3") + 1,4 ``` returns the real number `8,4` (`8.4` in English notation). `val("7.3") + 1,4` returns the expected value `8,7`. Is this a feature or a bug? How can I specify which decimal point will be used in function `val()`?

Original source