Help Center

CMoney.ToVarmethod

Returns the currency as a VT_CY variant.

Numeric Datatypesmethoddocumented

Syntax

FUNCTION ToVar () AS VARIANT

Description

Returns the currency as a VT_CY variant.

Remarks

Can be used to assign a currency directly to a VT_CY VARIANT

or to a DVARIANT

Examples

DIM c AS CMoney = 12345.1234 DIM v AS VARIANT = c.ToVar

DIM c AS CMoney = 12345.1234 DIM dv AS DVARIANT = c.ToVar

Reference

  • Defined in AfxNova/CMoney.inc:406
  • Documented in Numeric Datatypes/CMoney Class.md
  • Topic: CMoney Class