Advertisement
veronikaaa86

Event - Command Button

Jan 13th, 2022
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1.  
  2. Private Sub cb_Click()
  3. Dim lastRow As Integer
  4. lastRow = Cells(Rows.Count, 1).End(xlUp).Row
  5.  
  6. Sheets.Add(Before:=Sheets("Sheet0")).Name = "Protocol"
  7.  
  8. CopyData
  9. InsertColumns
  10. FormatHeader (lastRow)
  11.  
  12. PracticalAndTheoreticalPoints (lastRow)
  13. 'practicalExamTB
  14. 'theoreticalExamTB
  15. Dim percentPractical, percentTheoretical As Integer
  16. percentPractical = practicalExamTB.Value
  17. percentTheoretical = theoreticalExamTB.Value
  18. CoursePoints lastRow, percentPractical, percentTheoretical
  19.  
  20. 'pointsFor5TB
  21. 'pointsFor3TB
  22.  
  23. Dim pointsFor5, pointsFor3 As Integer
  24. pointsFor5 = pointsFor5TB.Value
  25. pointsFor3 = pointsFor3TB.Value
  26. Grade lastRow, pointsFor5TB, pointsFor3TB
  27.  
  28. CoursePLab.Caption = lastRow - 1
  29. End Sub
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement