Código:
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "Debe completar todos los campos (;"
Else
If Text1.Text = "+" Then
MsgBox "Introduzca solamente numeros"
Else
If Text2.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text3.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text4.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
a = CLng(Text1.Text) + CLng(Text2.Text) + CLng(Text3.Text) + CLng(Text4.Text)
'Pasamos a integer para poder sumar numeros
Text10.Text = a
End If
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
If Text5.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text6.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text7.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text8.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
b = CLng(Text5.Text) + CLng(Text6.Text) + CLng(Text7.Text) + CLng(Text8.Text)
Text11.Text = b
End If
End If
End If
End If
End Sub
Private Sub Command3_Click()
c = CLng(Text10.Text) - CLng(Text11.Text)
Text9.Text = c
End Sub
Private Sub Form_Load()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim d As Integer
Text10.Text = a
Text11.Text = b
End Sub
If Text1.Text = "" Then
MsgBox "Debe completar todos los campos (;"
Else
If Text1.Text = "+" Then
MsgBox "Introduzca solamente numeros"
Else
If Text2.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text3.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text4.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
a = CLng(Text1.Text) + CLng(Text2.Text) + CLng(Text3.Text) + CLng(Text4.Text)
'Pasamos a integer para poder sumar numeros
Text10.Text = a
End If
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
If Text5.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text6.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text7.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
If Text8.Text = "" Then
MsgBox "Debe completar todos los campos"
Else
b = CLng(Text5.Text) + CLng(Text6.Text) + CLng(Text7.Text) + CLng(Text8.Text)
Text11.Text = b
End If
End If
End If
End If
End Sub
Private Sub Command3_Click()
c = CLng(Text10.Text) - CLng(Text11.Text)
Text9.Text = c
End Sub
Private Sub Form_Load()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim d As Integer
Text10.Text = a
Text11.Text = b
End Sub
Quería guardarlo en una base de datos, en un archivo de word o algo,pero también quiero que se guarden,los datos junto con el día y la fecha.
Como lo podría hacer? espero sus respuestas,saludos.