Jump to content
xisto Community
Sign in to follow this  
zachtk8702

[tutorial] Visual Basic 6 Adding Commas to Large Numbers

Recommended Posts

This isn't a very long tutorial. I get asked this often, so here is the solution. The following code will return a string containing a number that has commas appropriately placed:Code:myStringOrProperty = FormatNumber(3587532789053, 0)The second parameter (0) represents how many decimal places you want the returned number to go out to. Unless your number contains its own decimal, you probably don't want .00 at the end of every number you have.The above code would return:3,587,532,789,053This should make life easier for many...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.