Returns the expression converted to a currency data type (Currency).

expressionThe expression to evaluate and convert to a currency.

* The Currency data type is a Value data type.
* The "expression" can be any number between -9.2 E+14 and +9.2 E+14.
* If "expression" cannot be converted to a number you will get a type mismatch error.
* This function can be used to force currency arithmetic in cases where single precision, double precision or integer arithmetic would normally occur.
* This function recognises decimals and thousand separators based on the local settings.
* An overflow error will occur if the value is out of range.
* For a full list of conversion functions refer to the Explicit Conversion page.
* For the Microsoft documentation refer to

Debug.Print CCur(20)       '= 20  

Dim lPrice As Long
lPrice = 12.75
Debug.Print CCur(lPrice) '= 13

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top