If IsNumeric(TextBox1.Text) Then
variable1 = Convert.ToDecimal(TextBox1.Text)
Else
MessageBox.Show("Must be a numeric value", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
If IsNumeric(TextBox1.Text) Then
variable1 = Convert.ToDecimal(TextBox1.Text)
Dim tempstring As String = variable1.ToString("n2")
variable1 = Convert.ToDecimal(tempstring)
Else
MessageBox.Show("Must be a numeric value", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If