title: Automatic part number creation, vb.net
body: <p>I am trying to create a userform that outputs a part number into a text box, after inputting the relevant data in the format of <code>.25X2.00X2.50</code>. I am having issues with keeping the trailing zeros to two places (even if the data added has no trailing zeros or more than two) and keeping the "X" in between the values. Below is a small portion of the code I have, which keeps giving me <code>25X2X25</code>. Any pointers or advice will be greatly appreciated.</p>
  
  <pre><code>Dim AngleThicknessRound As Decimal = Decimal.Parse(AngleThicknessRound).ToString(AngleThickness.Text)
  Dim AngleLeg1Round As Decimal = Decimal.Parse(AngleLeg1Round).ToString(AngleLeg1.Text)
  Dim AngleLeg2Round As Decimal = Decimal.Parse(Math.Round(AngleLeg2Round, 2)).ToString(AngleLeg2.Text)
  ShapeAdd.Text = AngleThicknessRound &amp; "X" &amp; AngleLeg1Round &amp; "X" &amp; AngleLeg2Round
  </code></pre>