Function ListeImage(Path As String, Ext As String) Dim Fic As String Dim StrResult As String Fic = Dir(Path & "/*." & Ext, vbNormal) Do While Fic <> "" DoEvents StrResult = StrResult & Fic & vbCrLf Fic = Dir() Loop ListeImage = StrResult End Function
Sub ListeImage(Path As String, Ext As String, Lst As ListBox) Dim Fic As String Fic = Dir(Path & "/*." & Ext, vbNormal) Do While Fic <> "" DoEvents Lst.AddItem Fic Fic = Dir() Loop End Sub