Evitar Captura doble dentro del mes Userform
Tengo el siguiente codigo:
Private Sub guardar_Click()
Dim Fila As Long
Dim Final As Long
Dim Registro As Integer
Dim Titulo As String
'Determina el final del listado de DATOS
Final = GetNuevoR(Hoja6)
If client = "" Then
MsgBox "Debe llenar formulario primero", vbExclamation, Titulo
Else
If MsgBox("Son correctos los datos?", vbOKCancel + vbExclamation, Titulo) = vbOK Then
'Envía los datos a la hoja de DATOS
Hoja6.Cells(Final, 1) = Me.cant.Text
Hoja6.Cells(Final, 2) = Me.tecnico
Hoja6.Cells(Final, 3) = Me.tecasignado
Hoja6.Cells(Final, 4) = Format(fecha.Value, "mm/dd/yyyy")
Hoja6.Cells(Final, 5) = Me.reporte.Text
Hoja6.Cells(Final, 6) = Me.folio.Text
Hoja6.Cells(Final, 7) = Me.econo.Text
Hoja6.Cells(Final, 8) = Me.client
Hoja6.Cells(Final, 9) = Me.lectura.Text
Hoja6.Cells(Final, 10) = Me.department
Hoja6.Cells(Final, 11) = Me.modelo
Hoja6.Cells(Final, 12) = Me.hllegada
Hoja6.Cells(Final, 13) = Me.hsalida
Hoja6.Cells(Final, 14) = Me.fexpuesta
Hoja6.Cells(Final, 15) = Me.TextBox7.Text
If opt5.Value = True Then Hoja6.Cells(Final, 16) = "PREVENTIVO"
If opt6.Value = True Then Hoja6.Cells(Final, 16) = "CORRECTIVO"
If opt7.Value = True Then Hoja6.Cells(Final, 16) = "FALLA DE USUARIO"
If opt8.Value = True Then Hoja6.Cells(Final, 16) = "CONECTIVIDAD"
If opt9.Value = True Then Hoja6.Cells(Final, 16) = "FALLA DE EQUIPO"
If opt10.Value = True Then Hoja6.Cells(Final, 16) = "PENDIENTE"
If opt11.Value = True Then Hoja6.Cells(Final, 16) = "RECARGA DE TONER"
Hoja6.Cells(Final, 35) = Me.TextBox4
Hoja6.Cells(Final, 36) = Me.TextBox5
Hoja6.Cells(Final, 37) = Me.ptecnico
Hoja6.Cells(Final, 38) = Me.cartucho
For i = 1 To 9
If Me.Controls("ComboBox" & i).Value <> "" Then
If Me.Controls("TextBox" & i + 6).Value > 0 Then
Call Consumible_General(i)
End If
End If
Next
End If
End If
End SubQuiero que al ejecutar el código, verifique si el producto ya se encuentra registrado dentro del mes para no capturar dos veces el mismo servicio "PREVENTIVO".