in the line
Grades(g1, +g2)
could you not just use
Grades(g1, g2)
also on the lines
g1 = Start.Substring(12, 4)
g2 = Start.Substring(16, 4)
the variable Start doesn't appear to be initialized before you use it.
and in
strStudent(strLetterGrade) = varAverage
strLetterGrade doesn't appear to be initalize either - as well as it being a string not an integer (as pointed out by IcePlug earlier)
also not sure what
If Grades(g1, +g2) \ 2 = varAverage Then
varEveryonesGrade += varAverage
varEveryonesGrade = Math.Round(varEveryonesGrade / sum)
txtDsplyClsAvr.Text = "The class average is " & CStr(varEveryonesGrade)
End If
is doing at all
and which line are you getting the Index out of bounds error?
the variable sum only seems to be being used as a loop counter but is declared as a double - any reason why?