Advertisement
veronikaaa86

Protocol Macro - Button Event

Oct 4th, 2022
2,352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub CommandButton1_Click()
  2.     Sheets.Add(Before:=Sheets("Sheet0")).name = "Protocol"
  3.    
  4.     CopyData
  5.     InsertColumns
  6.     FormattingProtocol
  7.    
  8.     Dim lastRow As Integer
  9.     lastRow = Cells(Rows.Count, 1).End(xlUp).row
  10.    
  11.     Dim countParticipants As Integer
  12.     'countParticipantsLabel
  13.    countParticipants = lastRow - 1
  14.     countParticipantsLabel.Caption = countParticipants
  15.    
  16.     FillPracticalAndTheoreticalPoints (lastRow)
  17.    
  18.     'practicalPointsTB
  19.    'theoreticalPointsTB
  20.    Dim percentPracticalExam, percentTheoreticalExam As Integer
  21.     percentPracticalExam = practicalPointsTB.Value
  22.     percentTheoreticalExam = theoreticalPointsTB.Value
  23.     CoursePoints lastRow, percentPracticalExam, percentTheoreticalExam
  24.    
  25.     'pointsFor5TB
  26.    'pointsFor3TB
  27.    Dim pointsFor5, pointsFor3 As Integer
  28.     pointsFor5 = pointsFor5TB.Value
  29.     pointsFor3 = pointsFor3TB.Value
  30.     Grade lastRow, pointsFor5, pointsFor3
  31.    
  32.     SortData
  33. End Sub
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement