Crea un formulario con ocho etiquetas, nueve cajas de texto, tres botones ye escribe el siguiente código:
El botón Salir
Private Sub Command3_Click()
Unload Me
End
End Sub
El botón Limpiar
Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text1.SetFocus
End Sub
El botón Prom. Gral. Redondeado
Private Sub Command1_Click()
Dim n1 As Double, n2 As Double, n3 As Double, n4 As Double, n5 As Double, n6 As Double
Dim promedio As Integer
n1 = Val(Text2): n2 = Val(Text3)
n3 = Val(Text4): n4 = Val(Text5)
n5 = Val(Text6): n6 = Val(Text7)
promedio = ((n1 + n2 + n3 + n4 + n5 + n6) / 6)
Text8 = Str(promedio)
If promedio >= 9.5 Then
Text9 = "Excelente"
End If
If promedio >= 9 And promedio < 9.5 Then
Text9 = "Muy Bien"
End If
If promedio >= 8.5 And promedio < 9 Then
Text9 = "Bien"
End If
If promedio >= 8 And promedio < 8.5 Then
Text9 = "Regular"
End If
If promedio < 8 Then
Text9 = "Mal"
End If
End Sub
1. Manual de Visual Basic Principiante En el título de este curso, Manual de Visual Basic para Principiantes ,... [17/03/06] |
155.711 | ||||
2. Visual Basic Express. Crear alarma (1/4) Alarma en Visual Basic 2008. Sigue nuestro curso de informática y aprende a... [13/04/11] |
884 |
![]() |
|||
3. Visual Basic Express. Crear una alarma (2/4) Crear una alarma en Visual Basic 2008 Express . Te presentamos la continuación del... [13/04/11] |
352 |
![]() |