FormatCurrency() |
Top Previous Next |
FormatCurrency() - Formats a Number as a Currency Description The FormatCurrency() function takes a number or expression and returns a formatted currency value using the currency symbol defined in the control panel. FormatCurrency(Number[,Precision [,IncludeLeadingZero [,UseParensForNegatives [,GroupDigits]]]]) Returned formatted string Parameters The optional Precision parameter specifies the the number of decimal points to display. The optional IncludeLeadingZero parameter specifies whether fractions should be shown with a leading 0 before the decimal place. The possible values can be found in [id=52]this table[/id]. The optional UseParensForNegatives parameter specifies whether negative values should be shown within parentheses. The possible values can be found in [id=52]this table[/id]. The optional GroupDigits parameter specifies whether numbers should use the group delimiter specified in the computer's regional settings. The possible values can be found in [id=52]this table[/id]. Example MyAmount = FormatCurrency(15*30) 'contains $450.00
MyAmount = FormatCurrency(-54/7,2,,-1) 'contains ($7.71)
See Also: oUTILITIES.VBFormat() |