Its a program that will show your grade when you type in your marks.
Here is my code so far...
Private Sub cmdpress_Click()
Dim Marks As Single
Marks = Val(txtresult.Text)
If Marks >= 80 Then
txtresult.Text = "A"
Else
If Marks >= 70 Then
txtresult.Text = "B"
Else
If Marks >= 60 Then
txtresult.Text = "C"
Else
If Marks >= 50 Then
txtresult.Text = "D"
Else
If Marks < 50 Then
txtresult.Text = "You FAIL"
Else
If Marks < 0 Then
txtresult.Text = "Incorrect Marks entered"
Else
If Marks > 100 Then
txtresult.Text = "Incorrect Marks entered"
End If
End If
End If
End If
End If
End If
End If
End Sub
The last 2 incorrect marks entered code dosent work...
And how do i make my program only accept reading numbers from 0-100
And how do i make it give me a message that says "invalid number range entered" if i typed in a number that is not within 0-100.
Please help me and explain it to me as simple as possible as i'm a noob.
Thank you.
Edited by sammm, 16 May 2008 - 02:46 PM.