The attachment preview is chopped off after the first 10 KB. Please download the entire file.

```
Private Sub cboName_Click()
cboSubject.Clear
cboSubject.Text = "Choose..."
Set objExcel = CreateObject("Excel.Application")
strExcelPath = App.Path & "\"
strExcelGroup = cboGroup.Text
strExcelSemLvl = "_" & cboSemLvl.Text
strExcelFileName = cboGroup.Text & strExcelSemLvl & ".xls"
objExcel.application.Workbooks.Open (strExcelPath & strExcelFileName)
objExcel.Visible = False
If cboGroup.Text Like "NDCST*" And cboSemLvl.Text = "1" Then
'1st year Computer Studies
objExcel.activeworkbook.sheets("AF-1 IS").Activate
'retrieve the Student name, Assessment, Max weight from excel worksheet
'then input it into frmStudentResult
'retrieve Student Names
For i = 11 To 30
frmStudentResult.txtStudName(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 3).Value
'retrieve Actual Mark
frmStudentResult.txtMark(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 5).Value
frmStudentResult.txtMark(i + 9).Text = objExcel.activeworkbook.activesheet.cells(i, 7).Value
frmStudentResult.txtMark(i + 29).Text = objExcel.activeworkbook.activesheet.cells(i, 9).Value
frmStudentResult.txtMark(i + 49).Text = objExcel.activeworkbook.activesheet.cells(i, 11).Value
frmStudentResult.txtMark(i + 69).Text = objExcel.activeworkbook.activesheet.cells(i, 13).Value
frmStudentResult.txtMark(i + 89).Text = objExcel.activeworkbook.activesheet.cells(i, 15).Value
'retrieve Resit mark
frmStudentResult.txtResit(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 6).Value
frmStudentResult.txtResit(i - 9).Text = objExcel.activeworkbook.activesheet.cells(i, 8).Value
frmStudentResult.txtResit(i + 29).Text = objExcel.activeworkbook.activesheet.cells(i, 10).Value
frmStudentResult.txtResit(i + 49).Text = objExcel.activeworkbook.activesheet.cells(i, 12).Value
frmStudentResult.txtResit(i + 69).Text = objExcel.activeworkbook.activesheet.cells(i, 14).Value
frmStudentResult.txtResit(i + 89).Text = objExcel.activeworkbook.activesheet.cells(i, 16).Value
Next
'retrieve Maximum weight
frmStudentResult.txtPercent(0).Text = objExcel.activeworkbook.activesheet.cells(9, 5).Value
frmStudentResult.txtPercent(1).Text = objExcel.activeworkbook.activesheet.cells(9, 7).Value
frmStudentResult.txtPercent(2).Text = objExcel.activeworkbook.activesheet.cells(9, 9).Value
frmStudentResult.txtPercent(3).Text = objExcel.activeworkbook.activesheet.cells(9, 11).Value
frmStudentResult.txtPercent(4).Text = objExcel.activeworkbook.activesheet.cells(9, 13).Value
frmStudentResult.txtPercent(5).Text = objExcel.activeworkbook.activesheet.cells(9, 15).Value
'Retrieve Assessment (phases)
frmStudentResult.txtAssign(0).Text = objExcel.activeworkbook.activesheet.cells(8, 5).Value
frmStudentResult.txtAssign(1).Text = objExcel.activeworkbook.activesheet.cells(8, 7).Value
frmStudentResult.txtAssign(2).Text = objExcel.activeworkbook.activesheet.cells(8, 9).Value
frmStudentResult.txtAssign(3).Text = objExcel.activeworkbook.activesheet.cells(8, 11).Value
frmStudentResult.txtAssign(4).Text = objExcel.activeworkbook.activesheet.cells(8, 13).Value
frmStudentResult.txtAssign(5).Text = objExcel.activeworkbook.activesheet.cells(8, 15).Value
'Retrieve Date
frmStudentResult.lblDate.Caption = objExcel.activeworkbook.activesheet.cells(34, 22).Value
'Add subject taught by the leacturer in the combo box
If cboName.Text = objExcel.activeworkbook.activesheet.cells(34, 9).Value Then
cboSubject.AddItem objExcel.activeworkbook.activesheet.cells(5, 15)
End If
'next
objExcel.activeworkbook.sheets("AF-1 CSM").Activate
'retrieve Student Names
For i = 11 To 30
frmStudentResult.txtStudName(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 3).Value
'retrieve Actual Mark
frmStudentResult.txtMark(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 5).Value
frmStudentResult.txtMark(i + 9).Text = objExcel.activeworkbook.activesheet.cells(i, 7).Value
frmStudentResult.txtMark(i + 29).Text = objExcel.activeworkbook.activesheet.cells(i, 9).Value
frmStudentResult.txtMark(i + 49).Text = objExcel.activeworkbook.activesheet.cells(i, 11).Value
frmStudentResult.txtMark(i + 69).Text = objExcel.activeworkbook.activesheet.cells(i, 13).Value
frmStudentResult.txtMark(i + 89).Text = objExcel.activeworkbook.activesheet.cells(i, 15).Value
'retrieve Resit mark
frmStudentResult.txtResit(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 6).Value
frmStudentResult.txtResit(i - 9).Text = objExcel.activeworkbook.activesheet.cells(i, 8).Value
frmStudentResult.txtResit(i + 29).Text = objExcel.activeworkbook.activesheet.cells(i, 10).Value
frmStudentResult.txtResit(i + 49).Text = objExcel.activeworkbook.activesheet.cells(i, 12).Value
frmStudentResult.txtResit(i + 69).Text = objExcel.activeworkbook.activesheet.cells(i, 14).Value
frmStudentResult.txtResit(i + 89).Text = objExcel.activeworkbook.activesheet.cells(i, 16).Value
Next
'retrieve Maximum weight
frmStudentResult.txtPercent(0).Text = objExcel.activeworkbook.activesheet.cells(9, 5).Value
frmStudentResult.txtPercent(1).Text = objExcel.activeworkbook.activesheet.cells(9, 7).Value
frmStudentResult.txtPercent(2).Text = objExcel.activeworkbook.activesheet.cells(9, 9).Value
frmStudentResult.txtPercent(3).Text = objExcel.activeworkbook.activesheet.cells(9, 11).Value
frmStudentResult.txtPercent(4).Text = objExcel.activeworkbook.activesheet.cells(9, 13).Value
frmStudentResult.txtPercent(5).Text = objExcel.activeworkbook.activesheet.cells(9, 15).Value
'Retrieve Assessment (phases)
frmStudentResult.txtAssign(0).Text = objExcel.activeworkbook.activesheet.cells(8, 5).Value
frmStudentResult.txtAssign(1).Text = objExcel.activeworkbook.activesheet.cells(8, 7).Value
frmStudentResult.txtAssign(2).Text = objExcel.activeworkbook.activesheet.cells(8, 9).Value
frmStudentResult.txtAssign(3).Text = objExcel.activeworkbook.activesheet.cells(8, 11).Value
frmStudentResult.txtAssign(4).Text = objExcel.activeworkbook.activesheet.cells(8, 13).Value
frmStudentResult.txtAssign(5).Text = objExcel.activeworkbook.activesheet.cells(8, 15).Value
'Retrieve Date
frmStudentResult.lblDate.Caption = objExcel.activeworkbook.activesheet.cells(34, 22).Value
'Add subject taught by the leacturer in the combo box
If cboName.Text = objExcel.activeworkbook.activesheet.cells(34, 9).Value Then
cboSubject.AddItem objExcel.activeworkbook.activesheet.cells(5, 15)
End If
'next
objExcel.activeworkbook.sheets("AF-1 PD").Activate
'retrieve Student Names
For i = 11 To 30
frmStudentResult.txtStudName(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 3).Value
'retrieve Actual Mark
frmStudentResult.txtMark(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 5).Value
frmStudentResult.txtMark(i + 9).Text = objExcel.activeworkbook.activesheet.cells(i, 7).Value
frmStudentResult.txtMark(i + 29).Text = objExcel.activeworkbook.activesheet.cells(i, 9).Value
frmStudentResult.txtMark(i + 49).Text = objExcel.activeworkbook.activesheet.cells(i, 11).Value
frmStudentResult.txtMark(i + 69).Text = objExcel.activeworkbook.activesheet.cells(i, 13).Value
frmStudentResult.txtMark(i + 89).Text = objExcel.activeworkbook.activesheet.cells(i, 15).Value
'retrieve Resit mark
frmStudentResult.txtResit(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 6).Value
frmStudentResult.txtResit(i - 9).Text = objExcel.activeworkbook.activesheet.cells(i, 8).Value
frmStudentResult.txtResit(i + 29).Text = objExcel.activeworkbook.activesheet.cells(i, 10).Value
frmStudentResult.txtResit(i + 49).Text = objExcel.activeworkbook.activesheet.cells(i, 12).Value
frmStudentResult.txtResit(i + 69).Text = objExcel.activeworkbook.activesheet.cells(i, 14).Value
frmStudentResult.txtResit(i + 89).Text = objExcel.activeworkbook.activesheet.cells(i, 16).Value
Next
'retrieve Maximum weight
frmStudentResult.txtPercent(0).Text = objExcel.activeworkbook.activesheet.cells(9, 5).Value
frmStudentResult.txtPercent(1).Text = objExcel.activeworkbook.activesheet.cells(9, 7).Value
frmStudentResult.txtPercent(2).Text = objExcel.activeworkbook.activesheet.cells(9, 9).Value
frmStudentResult.txtPercent(3).Text = objExcel.activeworkbook.activesheet.cells(9, 11).Value
frmStudentResult.txtPercent(4).Text = objExcel.activeworkbook.activesheet.cells(9, 13).Value
frmStudentResult.txtPercent(5).Text = objExcel.activeworkbook.activesheet.cells(9, 15).Value
'Retrieve Assessment (phases)
frmStudentResult.txtAssign(0).Text = objExcel.activeworkbook.activesheet.cells(8, 5).Value
frmStudentResult.txtAssign(1).Text = objExcel.activeworkbook.activesheet.cells(8, 7).Value
frmStudentResult.txtAssign(2).Text = objExcel.activeworkbook.activesheet.cells(8, 9).Value
frmStudentResult.txtAssign(3).Text = objExcel.activeworkbook.activesheet.cells(8, 11).Value
frmStudentResult.txtAssign(4).Text = objExcel.activeworkbook.activesheet.cells(8, 13).Value
frmStudentResult.txtAssign(5).Text = objExcel.activeworkbook.activesheet.cells(8, 15).Value
'Retrieve Date
frmStudentResult.lblDate.Caption = objExcel.activeworkbook.activesheet.cells(34, 22).Value
'Add subject taught by the leacturer in the combo box
If cboName.Text = objExcel.activeworkbook.activesheet.cells(34, 9).Value Then
cboSubject.AddItem objExcel.activeworkbook.activesheet.cells(5, 15)
End If
objExcel.activeworkbook.sheets("AF-1 PL1").Activate
'retrieve Student Names
For i = 11 To 30
frmStudentResult.txtStudName(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 3).Value
'retrieve Actual Mark
frmStudentResult.txtMark(i - 11).Text = objExcel.activeworkbook.activesheet.cells(i, 5).Value
frmStudentResult.txtMark(i + 9).Text = objExcel.activeworkbook.activesheet.cells(i, 7).Value
f
```