CDec Function

Converts an expression to a Decimal value. The expression argument is any valid expression.

CDec (Expression)

Return Value

Returns an expression that has been converted to a Decimal value.

Examples

CDec ("123")

Returns the decimal value 123.

CDec ("123.45")

Returns the decimal value 123.45.

CDec ("-123.45")

Returns the decimal value -123.45.

TIP:

Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.

See Also

CBool function | CCur function | CDate function | CDec function | CInt function | CStr function | CUInt function | Functions


© 2004-2021 looksoftware. All rights reserved.