Pa kien sepa Visual Basic....(Es de una calculadora)
Private Sub Command11_Click()
Dim suma As Integer
suma = CInt(Text1.Text)
Text1.Text = ""
End Sub
Private Sub Command12_Click()
Dim resta As Integer
resta = CInt(Text1.Text)
Text1.Text = ""
End Sub
Private Sub Command13_Click()
Dim multi As Integer
multi = CInt(Text1.Text)
Text1.Text = ""
End Sub
Private Sub Command14_Click()
Dim divi As Integer
divi = CInt(Text1.Text)
Text1.Text = ""
End Sub
Sub Command15_Click()
Text1.Text = CInt(suma) + CInt(Text1.Text)
End Sub
Cuando ejecuto esto (meto un numero, le doi a la operacion, meto otro y le doi a calcular) me señala la variable suma de el boton 15 (command15, el igual) y me dice k la variable no esta definida
Que le pasa?
Private Sub Command11_Click()
Dim suma As Integer
suma = CInt(Text1.Text)
Text1.Text = ""
End Sub
Private Sub Command12_Click()
Dim resta As Integer
resta = CInt(Text1.Text)
Text1.Text = ""
End Sub
Private Sub Command13_Click()
Dim multi As Integer
multi = CInt(Text1.Text)
Text1.Text = ""
End Sub
Private Sub Command14_Click()
Dim divi As Integer
divi = CInt(Text1.Text)
Text1.Text = ""
End Sub
Sub Command15_Click()
Text1.Text = CInt(suma) + CInt(Text1.Text)
End Sub
Cuando ejecuto esto (meto un numero, le doi a la operacion, meto otro y le doi a calcular) me señala la variable suma de el boton 15 (command15, el igual) y me dice k la variable no esta definida
Que le pasa?
Comentario