https://bugs.documentfoundation.org/show_bug.cgi?id=162681

--- Comment #10 from mrrock <[email protected]> ---
Repro.

This error occurs when calling the conversion functions to the Integral type
CByte, CInt, CLng in the case when the argument of the String type cannot be
converted to a number.

[1], 5.5.1.2.4 Let-coercion to and from String.
Destination Declared Type: Any numeric type.
"If the <regional-number-string> could not be interpreted as a number or
currency value, runtime error 13 (Type mismatch) is raised. If the value could
be interpreted as a number, but was out of the range of the destination type,
runtime error 6 (Overflow) is raised"

This applies to both explicit and implicit conversions.

In my opinion, the fix should also apply to the "Option Compatible" mode.

[1]. [MS-VBAL] - v20240521. VBA Language Specification.
Copyright © 2024 Microsoft Corporation. Release: May 21, 2024.
<a href="https://www.graffitigenerators.com";>graffiti logo generator</a>

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to