ActiveX
To format a currency cell
At run time,
- If your control contains more than one sheet, specify the sheet with which you want to work by setting the Sheet property.
- Set the Col, Col2, Row, and Row2 properties as appropriate.
- If you are selecting a block of cells, set the BlockMode property to True.
- Set the CellType property to 12 (Currency).
- If you want to hide the currency symbol, set the TypeCurrencyShowSymbol property to False.
- If you want to specify a custom currency symbol, provide the symbol using the TypeCurrencySymbol property.
-
If you want to specify a custom separator character, provide the character using the TypeCurrencySeparator property.
You must set the TypeCurrencyShowSep property to True to display a separator character.
- If you want to specify a custom decimal symbol, provide the symbol using the TypeCurrencyDecimal property.
- If you want to specify whether a leading zero is displayed for values between 1.0 and –1.0, set the TypeCurrencyLeadingZero property.
- If you want to specify a different format for positive values, set the TypeCurrencyPosStyle property.
- If you want to specify a different format for negative values, set the TypeCurrencyNegStyle property.
- If you selected a block of cells, set the BlockMode property back to False.