aaaaa ok ya entendí, ¿lo qué me sugieres y sera que me puedas ayudar a crear ese código?
Mira este es el código donde lo anexare:
Private Sub CommandButton1_Click()
If TextBox2.Value = "" Then
MsgBox "Falta dato de: " & Label2.Caption, , "ALTO"
TextBox2.SetFocus
Exit Sub
End If
If TextBox3.Value = "" Then
MsgBox "Falta dato de: " & Label3.Caption, , "ALTO"
TextBox3.SetFocus
Exit Sub
End If
If TextBox4.Value = "" Then
TextBox4.SetFocus
MsgBox "Falta dato de: " & Label4.Caption, , "ALTO"
TextBox4.SetFocus
Exit Sub
End If
AGREGA = MsgBox("¿Deseas agregar a: " & TextBox2.Value & " En la base de datos ?", vbYesNo + vbQuestion, "AVISO")
If AGREGA = vbYes Then
********AQUI AGREGAR EL CODIGO DE VALORACION DE DATOS REPETIDOS*************
'ActiveCell.Offset(0, -1).Value = ""
End If
End If
Exit Sub
ActiveCell.Offset(0, 1).Value = TextBox2.Value
ActiveCell.Offset(0, 2).Value = TextBox3.Value
ActiveCell.Offset(0, 5).Value = TextBox4.Value
CAPTURA_FORMULARIO.TextBox3.Value = ActiveCell.Offset(0, 1)
CAPTURA_FORMULARIO.TextBox1.Value = ActiveCell.Offset(0, 0)
CAPTURA_FORMULARIO.TextBox9.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox10.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox11.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox12.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox13.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox14.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox15.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox16.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox17.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox18.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox19.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox20.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox21.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox22.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox23.Value = "$0.00"
CAPTURA_FORMULARIO.TextBox24.Value = "$0.00"
Else
ELIMINAR_ULTIMO_FOLIO
'Unload Me
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox2.SetFocus
Exit Sub
End If
AGREGA_2 = MsgBox("¿Seguir agregando personal ?", vbYesNo + vbQuestion, "AVISO")
If AGREGA_2 = vbYes Then
AGREGAR_ULTIMO_FOLIO
TextBox1.Value = ActiveCell
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox2.SetFocus
Else
Unload Me
End If
End Sub
Private Sub CommandButton2_Click()
ELIMINAR_ULTIMO_FOLIO
Unload Me
End Sub
ahi te marque donde colocar el codigo, antes de agregar el dato entonces que me evalue si es posible o no, yo tenia ese pero tu idea es buena!