|
-
Oct 5th, 2000, 09:19 AM
#1
I have a function,
Public Function toTwoDecimals(x As Double) As Double
toTwoDecimals = (Format(x, "0.00"))
End Function
it reduces decimals to only two decimal places. Thats ok but if you get an answer like 123.30 it prints it out as 123.3. I was just wondering if anbody knew some code to put in the function so i will get the 0 as well?
I thought that if I added in the code below it would work, but it didn't:
IIf((x * 100) Mod 10 = 0, x & "0", x)
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|