Usar botón de Guardado para cambios en listbox

Querría crear un botón para Guardar todos los cambios que realizo en los valores de un listbox que a su vez modifican, actualizan los datos de la hoja "Titulos".

1 Respuesta

Respuesta
1

H o l a:

Te anexo el código para guardar los cambios.

Private Sub CommandButton3_Click()
'Por.Dante Amor
    'Guardar
    Set h1 = Sheets("FILTRO")
    Set h2 = Sheets("TITULOS")
    u = h1.Range("B" & Rows.Count).End(xlUp).Row
    If u = 1 Then
        MsgBox "No hay registros a actualizar", vbExclamation
        Exit Sub
    End If
    If cambio = False Then
        MsgBox "No se han realizado cambios", vbExclamation
        Exit Sub
    End If
    '
    For i = 2 To h1.Range("B" & Rows.Count).End(xlUp).Row
        ucol = h1.Cells(1, Columns.Count).End(xlToLeft).Column + 1
        If h1.Cells(i, ucol) <> "" Then
            For j = 3 To ucol
                fila = h1.Cells(i, "A")
                If IsNumeric(h1.Cells(i, j)) Then dato = h1.Cells(i, j) Else dato = Val(h1.Cells(i, j))
                h2.Cells(fila, j - 1) = dato
            Next
        End If
    Next
    MsgBox "Actualización terminada", vbInformation, "GUARDAR"
    TextBox1_Enter
    ComboBox1 = ""
    ComboBox1.SetFocus
End Sub

'

S a l u d o s

La pregunta no admite más respuestas

Más respuestas relacionadas