CSng

This function converts an expression to a Variant of subtype Single.

Syntax

CSng(expression)

Parameters

expression
Any valid expression.

Return Values

Returns a Variant of subtype Single.

Remarks

Use CSng to force currency arithmetic in cases where using expression directly would result in a type mismatch or other error.

If expression lies outside the acceptable range for the Single subtype, an overflow error occurs.