You are on page 1of 3

boton calcular

Dim prom As Double


Text5 = (Val(Text1) + Val(Text2) + Val(Text3) + Val(Text4)) / 4
If Val(Text5) >= 9.5 Then
MsgBox ("APROBO")
ElseIf prom <= 5 Then
MsgBox ("REPITE")
Else
MsgBox ("REPARA")
End If
boton borrar
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
boton salir
End

numero negativo o positivo


boton validar
Text1 = Me.Text1.Text
If Text1 < 0 Then
MsgBox ("Numero Negativo")
Else
MsgBox ("Numero Positivo")
End If

boton par o impar


If (Text1.Text) Mod 2 = 0 Then
Text2.Text = "Numero Par"
Else
Text2.Text = "Nmero Impar"
End If

mayor o menor, igual


boton ordenar
Dim Text1, Text2, Text3 As Integer
Text1 = Me.Text1.Text
Text2 = Me.Text2.Text
Text3 = Me.Text3.Text
If Text1 > Text2 And Text1 > Text3 Then
Me.Text4.Text = "El Primero numero es Mayor"
Else
If Text2 > Text1 And Text2 > Text3 Then
Me.Text4.Text = "El segundo numero es Mayor"
Else
If Text3 > Text1 And Text3 > Text2 Then
Me.Text4.Text = "El tercer numero es mayor"
Else
MsgBox ("Los Numeros son Iguales")
End If
End If
End If

You might also like