I’m beating my head against the wall on this one. It should be very straight forward. I want the positive value of a number which should be what the ABS function does. Right?
Every time I pass a whole number such as 29988 I end up with the exp notation. If factor = .01 then Abs(amt.DoubleValue * factor) should = 299.88
Dim amt As Variant
if Absolute then
// Here, amt = 29988
amt = Abs(amt.DoubleValue * factor)
// Here, amt = 2.998e+4
else
amt = amt.DoubleValue * factor
end if
I found that by returning amt.CurrencyValue I end up with 299.8800 if factor = .01. I guess I shouldn’t get too hung up on the numeric representation of a number.
What you end up with is a number, not a notation. The notation of the number is what you get when you convert the number to a string using Str or Format, and you can pass a parameter specifying the desired format (i.e. if you dont want scientific notation).