viernes, 30 de marzo de 2012


Private Sub Command1_Click()
Label4.Caption = "+"
End Sub

Private Sub Command2_Click()
Label4.Caption = "-"
End Sub

Private Sub Command3_Click()
Label4.Caption = "*"
End Sub

Private Sub Command4_Click()
Label4.Caption = "/"
End Sub

Private Sub Command5_Click()
If Label4.Caption = "+" Then
Label3.Caption = Val(Text1.Text) + (Text2.Text)
Else
If Label4.Caption = "-" Then
Label3.Caption = Val(Text1.Text) - (Text2.Text)
Else
If Label4.Caption = "*" Then
Label3.Caption = Val(Text1.Text) * (Text2.Text)
Else
If Label4.Caption = "/" Then
Label3.Caption = Val(Text1.Text) / (Text2.Text)
End If
End If
End If
End If

End Sub