Forum Moderators: open
This is what I am trying to achieve:
2.45454545 --> 2.45
2.45 --> 2.45
2.4 --> 2.40
2 --> 2.00
Dim oldValue as String
Dim newValue as string
oldValue = "2.45454545"
newValue = FormatNumber(oldValue, 2, , , TriState.False)
newValue now equals "2.45"
Another function you may like is FormatCurrency [msdn.microsoft.com].
-=casey=-