Hi TechyV!
I have a variable named total and its data type is currency.
Everytime an item is inserted in the flex grid, the total increases by adding the items prices.
But there are some instances that decimal points are too long.
How can I change the decimal point format on it?
For example:
25.3333 --> 25.33
- Login or Signup Now to post comments

Two depending can be used according to your desire.
Following is Syntax for FormatNumber
FormatNumber (Expression[,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])
The syntax for FormatCurrency is exactly the same as the one above.
The number of digits after the decimal point can be specify like this
Dim dblTestNum As Double
dblTestNum = 1000.6666
// using FormatNumber
FormatNumber(dblTestNum, 2, True, True, True)
Output: 1000.66
Hope It will help You