Dim EquipmentC As Worksheet ' Set for Equipment Center
Dim ws As Worksheet 'Set it for MasterFile
Dim Requirement As Worksheet ' Set for Master Support Plan school
Dim iRow As Long
Sub SaveButton_Click()
Set EquipmentC = Workbooks("EquipmentCenter.xls").Sheets("Summary")
Set ws = Worksheets("Support Plans.xls").Sheets(SchoolSelect.Value)
With EquipmentC
iRow = EquipmentC.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Row
EquipmentC.Cells(iRow, 1).Value = IDNumber.Value
End With
With ws
iRow = ws.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Row
.Cells(iRow, 1).Value = IDNumber.Value
.Cells(iRow, 2).Value = LastName
.Cells(iRow, 3).Value = FirstName.Value
.Cells(iRow, 4).Value = ProgrammeCode.Value
.Cells(iRow, 5).Value = Status.Value
.Cells(iRow, 6).Value = ProgrammeStart.Value
.Cells(iRow, 7).Value = Module1.Value
.Cells(iRow, 8).Value = Module2.Value
.Cells(iRow, 9).Value = Module3.Value
.Cells(iRow, 10).Value = Module4.Value
.Cells(iRow, 11).Value = Module5.Value
.Cells(iRow, 12).Value = Module6.Value
.Cells(iRow, 13).Value = Module7.Value
.Cells(iRow, 14).Value = Module8.Value
.Cells(iRow, 15).Value = Module9.Value
.Cells(iRow, 16).Value = Module10.Value
.Cells(iRow, 17).Value = ExamRequirements.Value
.Cells(iRow, 18).Value = ReasonForPlan.Value
End With
With ExamRequirements.Value
If ExamRequirements.Value = "Extra Time" Then
Set Requirement = Application.Workbooks("ExtraTime.xls").Sheets(SchoolSelect.Value)
ElseIf ExamRequirements.Value = "Additional Support" Then
Set Requirement = Application.Workbooks("AdditionalSupport.xls").Sheets(SchoolSelect.Value)
End If
End With
With Requirement
.Cells(iRow, 1).Value = IDNumber.Value
.Cells(iRow, 2).Value = LastName
.Cells(iRow, 3).Value = FirstName.Value
End With
End Sub
Private Sub SchoolSelect_Change()
If SchoolSelect.Value = "Art & Design" Then
NewSupportPlan.ProgrammeCode.Clear
With NewSupportPlan
.ProgrammeCode.RowSource = "ArtDes"
End With
ElseIf SchoolSelect.Value = "Technology" Then
NewSupportPlan.ProgrammeCode.Clear
With NewSupportPlan
.ProgrammeCode.RowSource = "Tech"
End With
ElseIf SchoolSelect.Value = "Humanities" Then
NewSupportPlan.ProgrammeCode.Clear
With NewSupportPlan
.ProgrammeCode.RowSource = "Hum"
End With
ElseIf SchoolSelect.Value = "" Then
NewSupportPlan.ProgrammeCode.Clear
SchoolSelect.SetFocus
MsgBox "Please Select a School"
End If
End Sub
Public Sub CloseBtn_Click()
Unload Me
End Sub