CDec Function Example

This example uses the CDec function to convert a numeric value to a Decimal.

Dim MyDecimal, MyCurr
MyCurr = 10000000.0587    ' MyCurr is a Currency.
MyDecimal = CDec(MyCurr)     ' MyDecimal is a Decimal.