Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 152
  • Last Modified:

Format Number in Answer Box

How do I Format a number in the answer box(txtAnswer.Text) with 3 decimal places, No leading zeros and no commas
0
earth2d
Asked:
earth2d
1 Solution
 
mcriderCommented:
Use the Format statement....

For example:

   Dim X
   X = 2.23456
   txtAnswer.Text = Format(X,"#.000")

txtAnswer will contain 2.234


Cheers!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now