CISA FotoGallery

Statistiche

Tot. visite contenuti : 928198
Home Articoli tecnici Moduli Riempire List con l'elenco files di una Cartella

Riempire List con l'elenco files di una Cartella

CODICE

Public Function FillListFiles(ctl As Access.ListBox, Startpath As string)
    Dim MyPath As String
    Dim
MyName As String
    
ctl .RowSource = ""
    MyPath = Startpath
    MyName = Dir(MyPath)
    Do While MyName <> ""
        With ctl
            .RowSource = .RowSource & MyName & ";"
        End With
        
MyName = Dir
    Loop
    
ctl.RowSource = Left(ctl.RowSource, Len(ctl.RowSource) - 1)
End Function