|
-
Oct 3rd, 2010, 04:40 PM
#1
Thread Starter
Junior Member
Invalid Data Alert
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|