What you want is a inputbox. A messagebox displays text and does not return a value, where as a inputbox does.
Inputbox(Prompt as String, Title as String, DefaultResponse as String, XPos, YPos)
Not there are a couple of ways to preform the task that you want.
1)Go through a countrol counter loop.
2)Enter grades through a infinant loop.
The first way is the easiest.
We will create a counter as integer(for the loop) and a total amount as double(for the grade input).
So ...
Dim counter as Integer, total as Double
'Then initiate the controlled loop
'Lets say we want five(5) grades
'Make it loop through five(5) times
For counter = 1 To 5
'Add those grades together
total += Val(InputBox("What grade?", Me.Text))
Next
'Display the percentage
MsgBox(total / 5 & "%", , Me.Text)
-----------------------
The second way is not defining the amount of grades you want to user the input (infinate amount).
'Start by declaring your variables
Dim final As Integer
Dim counter As Integer = 0
Dim current As String
'Initiate an infanant loop
While 1 > 0
'Get the grade
current = InputBox("Grades", Me.Text)
'Test the string input
Select Case current
Case Is > "a"
MsgBox("Error, must a number value", , Me.Text)
'If it is blank show the grades
Case Is = ""
MsgBox(final / counter, , Me.Text)
'Exit the loop
Exit While
Case Else
'If the user entered a number
'Add the grades together
final += CInt(current)
'Get the input number
counter += 1
End Select
End While