Format and Currency Values

Not sure what I am doing wrong here, but hopefully someone can help?

I am formatting a Currency variable, but when it comes out it is rounding to 1 decimal place…

  Dim Balance as Currency = 7180.04
  MsgBox Format(Balance, "\\£\\ #,###,##0.00;\\-\\£\\ #,###,##0.00") ' Comes out as £ 7,180.0
  MsgBox Balance.ToText ' Comes out as 7180.04

Is it me or is there a bug in this - I am assuming it is me, but…

Thanks

Phil

I think it is bug. If I change the £ to $ it works…

MsgBox Format(Balance, "\\$\\ #,###,##0.00;\\-\\$\\ #,###,##0.00") ' Comes out as $ 7,180.04

Can someone confirm for me and maybe tell me how to get around this ?

Thanks

With EURO:
MsgBox Format(Balance, “\€\ #,###,##0.00;\-\€\ #,###,##0.00”) ’ Comes out as € 7.180, and it should be € 7.180,04
MsgBox Format(Balance, “\E\U\R\ #,###,##0.00;\-\E\U\R\ #,###,##0.00”) ’ Comes out as EUR 7.180,04 and that is okay
MsgBox Format(Balance, “#,###,##0.00\ \€;\-\ #,###,##0.00\ \€”) ’ Comes out as 7.180,04 and it should be 7.180,04 €
MsgBox Format(Balance, “#,###,##0.00\ \E\U\R;\-\ #,###,##0.00\ \E\U\R”) ’ Comes out as 7.180,04 EUR and this is okay

msgbox DefineEncoding(Format(Balance, “#,###,##0.00\ \€;\-\ #,###,##0.00\ \€”),Encodings.UTF8) ’ Comes out as 7.180,04 € and this is correct

So you should use DefineEncoding when you use special language characters and maybe you must deal with any encoding types (Encodings.SystemDefault)

Thanks Horst, but shouldn’t currency symbols be handled automatically based on the system settings; so £ would work - and maybe $ wouldn’t ?

I wouldn’t except to have to handle £, Euros, $ any differently, so still feels like a bug