View Full Version : adding decimals and formatnumber together

03-16-2007, 06:15 PM
I have set a Dim that is:

dim A = 0.5
dim B = 0.5 but B i am using formatcurrency(dim B)

when i try to compare the two it doesn't let me.. but when i compare a whole number i.e 1 2 3 4 5 my code works fine ?? but ones with 0.5 or 1.5 don't work !!

any ideas why.. i have clng dim A and still nothing

this is what i am doing

if A = B then
end if


03-16-2007, 07:13 PM
Have you tried to convert both values to a double?

If CDbl(A) = CDbl(B)