Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / February 2010



Tip: Looking for answers? Try searching our database.

Converting a number to a comma deliminated number (similar to     currency)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
techman41973 - 27 Feb 2010 19:30 GMT
I need a function that converts a number to a comma deliminated number
similar to currency.
such as 533333  to 533,333 (basically adding in commas).
My application is to show the number of miles on a car (rather than
strict currency)

I tried the following function with experimenting changing the
VbFalse's to VBtrue's
no luck. I would appreciate some assistance. Thanks

myvar1 = FormatNumber(nm1, 2, vbFalse, vbFalse, vbFalse)
Gutless Umbrella Carrying Sissy - 28 Feb 2010 04:33 GMT
techman41973 <techman41973@yahoo.com> wrote in
news:90c1def8-8444-4a18-a664-7557424bb619@k5g2000pra.googlegroups.c
om:

> I need a function that converts a number to a comma deliminated
> number similar to currency.
[quoted text clipped - 7 lines]
>
> myvar1 = FormatNumber(nm1, 2, vbFalse, vbFalse, vbFalse)

myvar1 = Format(nm1, "###,###,##0")

Signature

Terry Austin

Terry Austin: like the polio vaccine, only with more a.shole. - David
Bilek

Yeah, I had Terry confused with Hannibal Lecter. - Mike Schilling

Jesus forgives sinners, not criminals.

Martin Trump - 28 Feb 2010 16:54 GMT
> I need a function that converts a number to a comma deliminated number
> similar to currency.
>  such as 533333  to 533,333 (basically adding in commas).

Debug.Print Format$(500001,"#,#")
500,001

HTH

Martin
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.