Here is the pseudo code and VBE code we used today.
If Percent<45 ThenDisplay FailElseif Percent>=45 ThenDisplay DElseif Percent>=50 thenDisplay CElseif Percent>=60 thenDisplay BElseif Percent>=75thenDisplay AElseDisplay “Error”End IF
VB Code
Dim Percent As Integer
Percent = InputBox(“Please enter the percentage”)
If Percent >= 75 Then
MsgBox(“A”)
ElseIf Percent >= 60 Then
MsgBox(“B”)
ElseIf Percent >= 50 Then
MsgBox(“C”)
ElseIf Percent >= 45 Then
MsgBox(“D”)
ElseIf Percent < 45 Then
MsgBox(“Fail”)
Else
MsgBox(“Error”)
End If
Remember the last Else is a error trap and if your program works correctly you should never see it.