Link to home
Start Free TrialLog in
Avatar of MushyPeas
MushyPeas

asked on

Format Currency with no decimal places eg $1000

VB6:

I've got a program that deals with BIG (multi-million) dollar values.  The user isn't interested in seeing the cents, but they DO want to see the currency symbol.  Fair enough.

If I use the VB Format(MyNumber,"Currency") syntax, VB always displays two decimal places (even if the number has been rounded first, i .e. Format(Round(MyNumber,0),"Currency") will give $100,00.00.  

How can I display these numbers with the appropriate currency formating for the users machine (it's used worldwide) and hide the last two decimal places?

Will raise the amount of points if it turns out to be a WinAPI type solution.

It seems so easy.....
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, please maintain your old open questions:

1 06/24/2003 100 VB.Net generated control in VB6.0 projec...  Open VB Controls
2 08/13/2003 200 MDAC_TYP Versions - OK to use 2.7?  Open VB Databases
3 09/18/2003 50 .oca,.lib,.exp files... do I need to dis...  Open VB Controls

Thanks,
Anthony
Also, please maintain your old open questions:

1 06/24/2003 100 VB.Net generated control in VB6.0 projec...  Open VB Controls
2 08/13/2003 200 MDAC_TYP Versions - OK to use 2.7?  Open VB Databases
3 09/18/2003 50 .oca,.lib,.exp files... do I need to dis...  Open VB Controls

Thanks,
Anthony
Sorry about the double post,
Anthony
Avatar of MushyPeas
MushyPeas

ASKER

Thank you sirbounty.. sometimes you just can't see for looking!

Acperkins: I'll look at my old posts.
I only know because I was in the same 'zone' a few months back!  :-)