To ensure no errors, you could use Decimal.TryParse instead of CDec
Code:If strParts.Length = 2 Then Dim d1, d2 As Decimal If Decimal.TryParse(strParts(0), d1) AndAlso Decimal.TryParse(strParts(1), d2) Then TextBox1.Text = d1.ToString("f4") TextBox2.Text = d2.ToString("f4") End If End If




Reply With Quote
