Formatting Numbers

  • Thread starter Thread starter bole2cant
  • Start date Start date
B

bole2cant

If you have code like this:

Textbox3.Text = Str(Val(Textbox1.Text) / Val(Textbox2.Text))

How do you format the result to just have one decimal place?
 
* "bole2cant said:
Textbox3.Text = Str(Val(Textbox1.Text) / Val(Textbox2.Text))

How do you format the result to just have one decimal place?

\\\
TextBox3.Text = (Val(TextBox1.Text) / Val(TextBox2.Text)).ToString("#.0")
///
 
Back
Top