Const mappeNavn = "C:\Documents and Settings\pb\Skrivebord\1312Spoi\filmappe" 'tilpasses Dim ræk Sub hentFilnavne() ræk = 1 FindFiler mappeNavn
Columns.AutoFit End Sub Private Sub FindFiler(folderspec) Dim fs, f, f1, fc Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(folderspec) Set fc = f.Files For Each f1 In fc filnavn = LCase(f1.Name) If Right(filnavn, 5) = "m.pdf" Then ActiveSheet.Cells(ræk, 1) = filnavn ræk = ræk + 1 End If Next End Sub
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.