i need to convert some currency's from 101,8194 to a number with xxxx,xx << always 2 numbers after the comma.... how can this be done? (and if possible let it change the value if greater than 5 dunno really what the name is for that
Printable View
i need to convert some currency's from 101,8194 to a number with xxxx,xx << always 2 numbers after the comma.... how can this be done? (and if possible let it change the value if greater than 5 dunno really what the name is for that
Hey, to change the numer 8821.416,
you can do:
VB Code:
Format(8821.416, "0.00") 'Produces 8821.41 'Or you can do: Round(8821.416, 2) 'Produces 8821.42
hey thanks.. that works like a charm :D
No problem... Format() is a really useful function, but I often don't use functions built into VB because right now, I am working with 3 languages... and I really think it is best to develop a functioin to do it all for you, or whatever... and then that way it can be carried over to other languages.
i still have a problem that Format(8821.416, "0.00") doesnt seem to solve.. and that is that 8,1 should become 8,10 :S or am i doing something wrong :S
What is your code. I just opened VB and put
VB Code:
MsgBox Format(8.1, "0.00")
gives me 8.10.