Cdbl Functions
Returns an expression that has been converted to a variant of the double subtype.
Cdbl (expression)
The expression parameter is any valid expression.
Description
Generally, you can use the subtype Data Conversion Function to write data.Code, To display the results of some operations should be expressed as a specific data type, rather than the default data type. For example, in the case of currency or integer operations, use the cdbl or csng function to force double or single-precision arithmetic operations.
The cdbl function is used to convert data from other data types to double subtypes in internationally recognized formats. For example, the identification of the decimal separator and the thousands separator depends on the system's regional settings.
The following example uses the cdbl function to convert expression to double.
Dim mycurr, mydouble
Mycurr = ccur (234.456784) 'mycurr is a currency type (234.4567 ).
Mydouble = cdbl (mycurr * 8.2*0.01) 'converts the result to double (19.2254576 ).