Private Sub CMDDIVIDIR_Click()
lbloperacion.Caption = "/"
End Sub
Private Sub CMDMULTIPLICAR_Click()
lbloperacion.Caption = "*"
End Sub
Private Sub CMDRESTAR_Click()
lbloperacion.Caption = "-"
End Sub
Private Sub CMDRESULTADO_Click()
If lbloperacion.Caption = "+" Then
Lblresultado.Caption = Val(Text1.Text) + (Text2.Text)
Else
If lbloperacion.Caption = "-" Then
Lblresultado.Caption = Val(Text1.Text) - (Text2.Text)
Else
If lbloperacion.Caption = "*" Then
Lblresultado.Caption = Val(Text1.Text) * (Text2.Text)
Else
If lbloperacion.Caption = "/" Then
Lblresultado.Caption = Val(Text1.Text) / (Text2.Text)
End If
End If
End If
End If
End Sub
Private Sub CMDSUMAR_Click()
lbloperacion.Caption = "+"
End Sub

No hay comentarios:
Publicar un comentario