Bonjour,
j'ai un probleme sous Excel 2003
mon code se deroule bien mais il ne trouve aucun fichier..??
Merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 Sub test() With Application.FileSearch .LookIn = "C:\Excel" .Filename = "*.*" .FileType = msoFileTypeExcelWorkbooks .Execute End With With Application.FileSearch If .Execute() > 0 Then MsgBox "There were " & .FoundFiles.Count & _ " file(s) found." For I = 1 To .FoundFiles.Count MsgBox .FoundFiles(I) Next I Else MsgBox "There were no files found." End If End With End Sub
Partager