-
Hey, i use the code
Equals = Str(Val(text1.text) + val(text2.text))
and it works perfectly..
altho i need it to Add decimals..
(if u try this out with a decimal, it ROUNDS the decimal..)
like money, so
$2
$2.10
$3.00
would = 7.10
How would i do this? thanks
-
Use the Format command.
result = FORMAT("7", "#0.00")
This should convert '7' to '7.00'
Hope this is of some help
-
You can omit the pound sign.
Code:
Equals = Str(Text1) + Val(Text2)
Equals = Format(Equals, "0.00")
Print Equals
-
Did you Dim Equals as Integer?
-
THANKS.. but its not there yet..
i type in
2
2.00
and
2.56
in the 3 boxes that i have..
When i ADD THEM ALL UP
it just appears as
7.00
it is still ROUNDING the .56
how would i do this so it adds all the CENTS up, which it isn't doing it is just rounding
Thanks
-
Try this.
Code:
Dim Equals As String
Equals = Str(Val(Text3) + Val(Text2) + Val(Text1))
Equals = Format(Equals, "0.00")
Print Equals
[Edited by Megatron on 08-08-2000 at 05:58 PM]
-
EXCELLENT!
THANKS
U are truely the guru