You can replace your code by this :
Private Sub BtnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCalculate.Click
Dim CreditPoints, Tcredits As Single
Tcredits = 0
CreditPoints = 0
Dim TotalGrade(10) As Single
Dim a As Control
For Each a In Me.Controls
If TypeOf a Is ComboBox Then
If a.Name.Contains("CmbGrade") Then
TotalGrade(CInt(a.Name.Remove("CmbGrade")) - 1) = Grade(DirectCast(a, ComboBox).SelectedItem)
End If
End If
Next
For Each a In Me.Controls
If TypeOf a Is TextBox Then
If a.Name.Contains("TxtCredit") Then
TotalGrade(CInt(a.Name.Remove("TxtCredit")) - 1) *= Val(DirectCast(a, TextBox).Text)
Tcredits = Tcredits + Val(Val(DirectCast(a, TextBox).Text))
End If
End If
Next
CreditPoints = TotalGrade.Cast(Of Double).Sum()
LblGPA.Text = CreditPoints / Tcredits
End Sub
Private Sub BtnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClear.Click
Dim a As Control
For Each a In Me.Controls
If TypeOf a Is TextBox Or TypeOf a Is ComboBox Then
a.Text = Nothing
End If
Next
End Sub
Private Sub Check_Text_And_Color(ByVal txtBxName As TextBox, ByRef CmbGrade As ComboBox)
If Not IsNumeric(txtBxName.Text) And Not (txtBxName.Text) = Nothing Then
txtBxName.Clear()
MsgBox("Please enter a number!")
Else
txtBxName.BackColor = Color(CmbGrade.SelectedItem)
End If
End Sub
Private Sub TxtCredit1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtCredit1.TextChanged
Check_Text_And_Color(TxtCredit1, CmbGrade1)
End Sub
Private Sub TxtCredit2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtCredit2.TextChanged
Check_Text_And_Color(TxtCredit2, CmbGrade2)
End Sub
Private Sub TxtCredit3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtCredit3.TextChanged
Check_Text_And_Color(TxtCredit3, CmbGrade3)
End Sub
Private Sub TxtCredit4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtCredit4.TextChanged
Check_Text_And_Color(TxtCredit4, CmbGrade4)
End Sub
Private Sub TxtCredit5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtCredit5.TextChanged
Check_Text_And_Color(TxtCredit5, CmbGrade5)
End Sub
Private Sub TxtCredit6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtCredit6.TextChanged
Check_Text_And_Color(TxtCredit6.Text, CmbGrade6)
End Sub