>A = 560.824
>
>
>
>B = A (but to two decimal places)
>
>
>note that both A and B Variables are memory variables!
>
>
>I want B to be = 560.82
>
>
>can anyone please tell me the syntax to convert a memory variable to two decimal places..
>
>(not an object variable cause i know the syntax i.e. object1.MaskDecimalPlaces = 2)
You can use
B = format(a,"#######0.00")
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com