Recherche

 

Il faut une macro sachant que, pour énumérer les fichiers, on peut utiliser soit la fonction Dir de Visual Basic, soit le File System Object :

 

Private Sub EnumFiles(FolderPath As String)
'macro écrite par Pierre Alexis
Dim sFile As String
sFile = Dir(FolderPath & "*", vbNormal)
While sFile <> ""
If sFile <> "." And sFile <> ".." Then
If (GetAttr(FolderPath & sFile) And vbDirectory) = 0 Then
MsgBox sFile
End If
End If
sFile = Dir
Wend
End Sub

 

Deuxième solution :

 

Private Sub EnumFiles(FolderPath As String
'macro écrite par Pierre Alexis
Dim fso As Scripting.FileSystemObject
Set fso = New Scripting.FileSystemObject
Dim f As File
For Each f In fso.GetFolder(FolderPath).Files
MsgBox f.Path
Next
Set fso = Nothing
End Sub

 

 

 

Statistiques

France 74,8% France
Canada 8,5% Canada
États-Unis d'Amérique 5,1% États-Unis d'Amérique

Total:

60

Pays
018271686
Aujourd'hui: 19
Hier: 96
Cette semaine: 752
Semaine dernière: 1.101
Ce mois: 4.483