 <p>For formatting options, see <a href="http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx" rel="nofollow">this</a> </p> <pre><code>Dim v1 as Double = Val(txtD.Text) / Val(txtC.Text) * Val(txtF.Text) / Val(txtE.Text) txtA.text = v1.ToString("N2"); </code></pre>