Vous êtes sur la page 1sur 2

FUNCION SI

USERFROM 1

Private Sub CommandButton1_Click()

Dim num1 As Integer

Dim num2 As Integer

num1 = Val(TextBox1)

num2 = Val(TextBox2)

If num1 > num2 Then

MsgBox " EL NUMERO " & num1 & " ES MAYOR QUE " & num2

Else

MsgBox " EL NUMERO " & num2 & " ES MAYOR QUE " & num1

End If

TextBox1 = Empty

TextBox2 = Empty

End Sub

MODULO

Sub calcular()

Dim num1 As Integer

num1 = Range("A1")

If num1 >= 6 Then

Range("B1").Select

ActiveCell.FormulaR1C1 = "APROBO"

Else

Range("B1").Select

ActiveCell.FormulaR1C1 = "DESAPROBO"

End If

End Sub

Sub ABRIR_FORMULARIO()

Load UserForm1

UserForm1.Show

End Sub

Vous aimerez peut-être aussi