target.FormatNumeric
Description
Description
Formats a numeric value according to a specified format.
Syntax
Syntax
Target.FormatNumeric(value, format)
Parameters
Parameters
variant value - the numeric value to be formatted
string format - the numeric format to be applied to the value (See numeric formats.)
Return value
Return value
string - a text representation of the numeric value according to the input format.
Example
Sample code
Dim val, dt
dt = CDbl( "4123.26" )
val = UserVar.FormatNumeric( dt, "#,###" ) ' the return value: 4,123
val = UserVar.FormatNumeric( dt, "#,###.#" ) ' the return value: 4,123.3
val = UserVar.FormatNumeric( dt, "E" ) ' the return value: 4.12326E+003
See also