Novice here with a question. I am writing a program that has to print an alert message in a textbox if the user inputs invalid data. Invalid data would be a negative number. The textbox is the same textbox as the result would be in provided they input valid data. Here is what I have but it will not print the alert.

principal = Val(principalTextBox.Text)
rate = Val(NumericUpDown.Value)
If principal < 0 Then
resultTextBox.Text = "The information input was not within the correct range of values."
End If