FormatCurrency

This function formats an expression as a currency value using the currency symbol defined in the system control panel.

Syntax

FormatCurrency(Expression, [ NumDigitsAfterDecimal], [IncludeLeadingDigit], [UseParensForNegativeNumbers], [ GroupDigits])

Parameters

Expression
Required. Expression to be formatted.
NumDigitsAfterDecimal
Optional. Numeric value that indicates how many places to the right of the decimal are displayed. Default value is –1, which indicates that the computer's regional settings are used.
IncludeLeadingDigit
Optional. Tristate constant that indicates whether or not a leading 0 is displayed for fractional values. The following table shows the settings for the IncludeLeadingDigit parameter.
Constant
Value
Description
TristateTrue –1 True.
TristateFalse 0 False.
TristateUseDefault –2 Use the setting from the computer's regional settings.

UseParensForNegativeNumbers
Optional. Tristate constant that indicates whether or not to place negative values within parentheses. The following table shows the possible values for the UseParensForNegativeNumbers parameter.
Constant
Value
Description
TristateTrue –1 True.
TristateFalse 0 False.
TristateUseDefault –2 Use the setting from the computer's regional settings.

GroupDigits
Optional. Tristate constant that indicates whether or not numbers are grouped using the group delimiter specified in the computer's regional settings. The following table shows the settings for the GroupDigits parameter.
Constant
Value
Description
TristateTrue –1 True.
TristateFalse 0 False.
TristateUseDefault –2 Use the setting from the computer's regional settings.

Return Values

Returns a formatted currency value.

Remarks

The regional settings of your desktop computer provide values for omitted parameters.

The regional settings of the computer determine the position of the currency symbol relative to the currency value.

All settings information comes from the Regional Settings Currency tab except for the leading 0, which comes from the Number tab.