Cargar ListBox en UserForm con diferentes Bases de Datos, con criterios adicionales

En el ListBox DLAE: necesito que solo se cargen los libros que todavía se encuentren con estado"PENDIENTE"

1 respuesta

Respuesta
1

H o l a:

Te anexo la macro actualizada

Sub llenalist_DLAE()
'Por.Dante Amor
    lst_DLAE.Clear
    Set h = Sheets("DETALLE DE PRESTAMOS.exe")
    Set r = h.Columns("I")
    If cbm_NCI <> "" Then
        Set b = r.Find(CDbl(cbm_NCI), lookat:=xlWhole)
        If Not b Is Nothing Then
            ncell = b.Address
            Do
                If h.Cells(b.Row, "k") = "PENDIENTE" Then
                    lst_DLAE.AddItem h.Cells(b.Row, "A")                            'Fecha
                    lst_DLAE.List(lst_DLAE.ListCount - 1, 1) = h.Cells(b.Row, "C")  'Libro
                    lst_DLAE.List(lst_DLAE.ListCount - 1, 2) = h.Cells(b.Row, "k")  'Estado
                End If
                Set b = r.FindNext(b)
            Loop While Not b Is Nothing And b.Address <> ncell
        End If
    End If
End Sub

S a l u d o s . D a n t e   A m o r. Recuerda valorar la respuesta.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas