No me guardaba en la bitácora 1.0

Lo siguiente eh usado la bitácora pero ayer 31 no me guardo en el excel los datos, me genero el pdf y todo pero de un momento a otro desapareció del excel y solo dejo dos filas agregadas con datos... ¿qué pudo haber sido?

1 respuesta

Respuesta
1

Tendría que revisar ese excel. Ninguna macro borra registros o mueve registros a otra hoja, o por lo menos las macros que yo conozco.

Tendrás alguna macro que limpié la hoja, tal vez debe limpiar otra hoja y por error limpia la hoja con datos.

Te envío el archivo y el pdf que fue generado al momento de agregar los datos, a los minutos más tarde no salían los datos que supuestamente se habían guardado solo salen con fecha 31-01-2018 turno A, solo los dos primeros

Van los cambios

Dim h
'
Private Sub BTNGUARDAR_Click()
    Dim fila As Long
    Dim duplicados As Boolean
    'Obtener la fila disponible
    'fila = Application.WorksheetFunction.CountA(Range("A:A")) + 1
    fila = h.Range("A" & Rows.Count).End(xlUp).Row + 1
    duplicados = False
    If Me.TXTUBICACION = "" Or Me.TXTEQUIPO = "" Or Me.TXTFECHA = "" Or Me.TXTINTERVENCION = "" Or Me.TXTTERMINO = "" Or Me.TXTDESCRIPCION = "" Then
        MsgBox "No dejar ningun campo vacio ", vbOK
    Else
        'Insertar datos capturados
        h.Cells(fila, 3).Value = Index.TXTUBICACION.Value
        h.Cells(fila, 4).Value = Index.TXTEQUIPO.Value
        h.Cells(fila, 5).Value = CDate(Index.TXTFECHA.Value)
        h.Cells(fila, 6).Value = Index.TXTINTERVENCION.Value
        h.Cells(fila, 7).Value = Index.TXTTERMINO.Value
        h.Cells(fila, 8).Value = Index.TXTDESCRIPCION.Value
        h.Cells(fila, "A").Value = Index.ComboBox1.Value
        h.Cells(fila, "B").Value = Index.ComboBox2.Value
        'RANGE("A:H").Select
       ' With Selection.Borders(xlEdgeBottom)
            '.LineStyle = xlContinuous
            '.Weight = xlThin
           ' .ColorIndex = xlAutomatic
        'Limpiar TXT
        Index.TXTUBICACION.Value = ""
        Index.TXTEQUIPO.Value = ""
        Index.TXTINTERVENCION.Value = ""
        Index.TXTTERMINO.Value = ""
        Index.TXTDESCRIPCION.Value = ""
        Index.ComboBox1.Value = ""
        Index.ComboBox2.Value = ""
        MsgBox "Datos Correctamente Ingresados"
   ' End With
    End If
End Sub
Private Sub BTNLISTAR_Click()
Load Listar
Listar.Show
End Sub
Private Sub btnsalir_Click()
'evalúa si hay otros libros abiertos
For Each wb In Workbooks
If wb.Name <> ActiveWorkbook.Name And UCase(Left(wb.Name, 8)) <> "Ingresar" Then i = 1
Next
'cierra el UF
Unload Me
'si es el único abierto cierra la aplicación
If i = 0 Then
    'guarda el libro
    ActiveWorkbook.Save
    ActiveWorkbook.Application.Quit
Else
    ActiveWorkbook.Close True '(guardado opcional)
End If
End Sub
Private Sub ComboBox2_Change()
End Sub
Private Sub Frame1_Click()
End Sub
Private Sub TXTFECHA_Change()
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
    Set h = Sheets("Ingresar")
    Me.TXTFECHA = Date
    Me.TXTFECHA.Enabled = False
    ComboBox1. AddItem "A"
    ComboBox1. AddItem "B"
    ComboBox1. AddItem "C"
    ComboBox1. AddItem "D"
    Rem combo2
    ComboBox2. AddItem "800"
    ComboBox2. AddItem "805"
    ComboBox2. AddItem "806"
    ComboBox2. AddItem "807"
End Sub

sal u dos

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas