Hello, so I want the program to read the number from the score tab (txtScore) and change it to an alphabet grade, and put it in the alphabet score tab (txtAlphabetS) in my userform, but I don't know how to make the subroutine to read the input in score tab and then insert it to alphabet score tab. Here's the userform design and the code
Code
Private Sub cmdInput_Click()
Name = txtName.Text
ID = txtID.Text
Score = txtScore.Text
AlphabetScore = txtAlphabetS.Text
Dim wsh As Worksheet
Set wsh = ThisWorkbook.Worksheets("sheet2")
Set tb1 = wsh.ListObjects("Table4")
Dim aRow As ListRow
Set aRow = tb1.ListRows.Add
With aRow
.Range(1) = Name
.Range(2) = ID
.Range(3) = Score
.Range(4) = AlphabetScore
End With
End Sub
Sub aScore()
Dim aScore As Integer
aScore = txtScore.Text
Select Case (aScore)
Case Is < 41
txtAlphabetS.Text = ("E")
Case 41 To 50
txtAlphabetS.Text = ("D")
Case 51 To 60
txtAlphabetS.Text = ("C")
Case 61 To 80
txtAlphabetS.Text = ("B")
Case 81 To 100
txtAlphabetS.Text = ("A")
End Select
End Sub
Private Sub cmdReset_Click()
Unload Me
UserForm2.Show
End Sub
Display More
Actually this is from the test that was held this morning, but I just want to know how to solve this problem because as you can see, I'm terrible at programming and I don't see any bright future in this subject alone. Thankfully I will not face any programming subject in my next semester (If I don't fail this class). Any help would be appreciated, thank you.