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
earth2dAsked:
Who is Participating?
 
mcriderConnect With a Mentor Commented:
Use the Format statement....

For example:

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

txtAnswer will contain 2.234


Cheers!
0
All Courses

From novice to tech pro — start learning today.