Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

[tutorial] Visual Basic 6


No replies to this topic

#1 zachtk8702

    Member [Level 2]

  • Kontributors
  • PipPipPipPipPip
  • 81 posts

Posted 10 February 2005 - 03:26 AM

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,053

This should make life easier for many...




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users