I hv some problem at diz line
(Open App.Path & "/Student.txt" For Append As #2
For A = 0 To ListCount - 1
Write #2, cbo.List(A)
Next
Close #2)
Private Sub cmdResult_Click()
Dim strName As String
Dim curExam, curPractical, curCoursework, curTotal As Currency
curExam = Val(txtExam.Text)
curPractical = Val(txtPractical.Text)
curCoursework = Val(txtCourseWork.Text)
curTotal = Val(lblTotal.Caption)
curTotal = (curExam * 70 / 100) + (curCoursework * 15 / 100) + (curPractical * 15 / 100)
If curTotal >= 80 Then
If curTotal <= 100 Then
lstGrade.AddItem "A"
End If
ElseIf curTotal >= 75 Then
If curTotal <= 79 Then
lstGrade.AddItem "A-"
End If
ElseIf curTotal >= 70 Then
If curTotal <= 74 Then
lstGrade.AddItem "B+"
End If
ElseIf curTotal >= 65 Then
If curTotal <= 69 Then
lstGrade.AddItem "B"
End If
ElseIf curTotal >= 60 Then
If curTotal <= 64 Then
lstGrade.AddItem "B-"
End If
ElseIf curTotal >= 55 Then
If curTotal <= 59 Then
lstGrade.AddItem "C+"
End If
ElseIf curTotal >= 50 Then
If curTotal <= 54 Then
lstGrade.AddItem "C"
End If
ElseIf curTotal >= 45 Then
If curTotal <= 49 Then
lstGrade.AddItem "C-"
End If
ElseIf curTotal >= 40 Then
If curTotal <= 44 Then
lstGrade.AddItem "D"
End If
ElseIf curTotal >= 0 Then
If curTotal <= 39 Then
lstGrade.AddItem "E"
End If
End If
If curTotal < 0 Then
MsgBox "The Value You Have Entered are Not Acceptable!", vbCritical, "Error"
End If
If curTotal > 100 Then
MsgBox "The Value You Have Entered are Not Acceptable!", vbCritical, "Error"
End If
lblTotal.Caption = curTotal 'Display the Total Mark
lstName.AddItem txtName 'Add Student Name into Name list
lstMark.AddItem lblTotal 'Add Student Mark into Mark list
Open App.Path & "/Student.txt" For Append As #2
For A = 0 To ListCount - 1
Write #2, cbo.List(A)
Next
Close #2
End Sub