Ahi va el codigo:
Private Sub boton_igual_Click()
IfStrOper="+" Then
TxtOper = LngValor + TxtOper.Text
End If
ifStrOper="-" Then
TxtOper = LongValor - TxtOper.Text
End If
IfSrOper="*" Then
TxtOper = LongValor - TxtOper.Text
End If
I StrOper="/" Then
TxtOper = LongValor / TxtOper.Text
End If
End Sub
Private Sub boton_menos_Click()
StrOper = "-"
LngValor = TxtOper.Text
TxtOper.Text = ""
End Sub
Private Sub boton_por_Click()
StrOper = "*"
LngValor = TxtOper.Text
TxtOper.Text = ""
End Sub
Private Sub boton0_Click()
TxtOper.Text = TxtOper.Text & "0"
End Sub
Private Sub boton1_Click()
TxtOper.Text = TxtOper.Text & "1"
End Sub
Private Sub boton2_Click()
TxtOper.Text = TxtOper.Text & "2"
End Sub
Private Sub boton3_Click()
TxtOper.Text = TxtOper.Text & "3"
End Sub
Private Sub boton4_Click()
TxtOper.Text = TxtOper.Text & "4"
End Sub
Private Sub boton5_Click()
TxtOper.Text = TxtOper.Text & "5"
End Sub
Private Sub boton6_Click()
TxtOper.Text = TxtOper.Text & "6"
End Sub
Private Sub boton7_Click()
TxtOper.Text = TxtOper.Text & "7"
End Sub
Private Sub boton8_Click()
TxtOper.Text = TxtOper.Text & "8"
End Sub
Private Sub boton9_Click()
TxtOper.Text = TxtOper.Text & "9"
End Sub
Private Sub Form_Load()
Var1 = "Luiggy"
MsgBox Var1
End Sub
El problema esta en las siguientes linas:
Private Sub boton_igual_Click()
IfStrOper="+"
Then TxtOper = LngValor + TxtOper.Text
End If
ifStrOper="-"
Then TxtOper = LongValor - TxtOper.Text
End If
IfSrOper="*"
Then TxtOper = LongValor - TxtOper.Text
End If
I StrOper="/"
Then TxtOper = LongValor / TxtOper.Text
End If
End Sub
Por cierto he ido probandolo segun lo he ido haciendo y me ha funcionado hasta llegar ahi (boton igual)
Gracias. espero sus rspuestas