Está en la página 1de 2

PROGRAMA CONTROL DE NOTAS

CÓDIGO BOTÓN CALCULAR


Dim B1, B2, B3, B4, P As Integer
Dim RESULTADO, CALIDAD As String
B1 = Val(TextBox8.Text)
B2 = Val(TextBox9.Text)
B3 = Val(TextBox10.Text)
B4 = Val(TextBox11.Text)
P = (B1 + B2 + B3 + B4) / 4
TextBox12.Text = P

If P >= 60 Then
RESULTADO = "APROBADO"
TextBox13.Text = RESULTADO
Else
RESULTADO = "REPROBADO"
TextBox13.Text = RESULTADO
End If
If P <= 59 Then
CALIDAD = "D"
TextBox14.Text = CALIDAD
End If
If P <= 70 Then
CALIDAD = "R"
TextBox14.Text = CALIDAD
End If
If P <= 80 Then
CALIDAD = "B"
TextBox14.Text = CALIDAD
End If
If P <= 90 Then
CALIDAD = "MB"
TextBox14.Text = CALIDAD
End If
If P >= 91 Then
CALIDAD = "E"
TextBox14.Text = CALIDAD
End If

CÓDIGO DEL BOTÓN NUEVO

TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
TextBox6.Clear()
TextBox7.Clear()
TextBox8.Clear()
TextBox9.Clear()
TextBox10.Clear()
TextBox11.Clear()
TextBox12.Clear()
TextBox13.Clear()
TextBox14.Clear()
TextBox1.Focus()
CÓDIGO DEL BOTÓN SALIR

End

También podría gustarte