.....
Printable View
.....
You would have to check if the values are invalid.
Try the IF statement, or the Select Case statement.
vbcode Code:
'Create Error Messege Variable Dim ErrMsg as String If Year < 1950 or Year > 2050 then ErrMsg = "Please enter value from 1950-2050" else ErrMsg = "" End If
vbcode Code:
'Create errormessage variable Dim ErrMsg as string select case year case <1950 or >2050 ErrMsg="Please enter a date between 1950 and 2050" case else 'set value to "" so no messege ErrMsg = "" 'do nothing, the value is inbetween end case
.....
I am at work and might not able able to fully answer you.
vb Code:
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click 'Put code here to get information from the text boxes. 'Also put code here to check the text boxes. 'Put code here to check the Interest to make sure it is >0 and <100, or >=0 and <=100 End Sub
Thank you! I got it!
Please don't just remove everything you posted. The idea of this forum is to help people. Now those who have the same question as you will have to ask it again instead of just reading this thread.
A selfish forum member? Sounds like an oxymoron..
Thread closed since it isn't of any use any more...