Bonjour,
je souhaite realiser une macro (Editeur VBA d'un logiciel de 3D) pour pouvoir chercher un fichier dans un dossier et le sous-dossier.
j'arrive à chercher dans le dossier, par contre je ne sais pas faire pour chercher dans les sous-dossiers :
Sub Test()
Application.ScreenUpdating = False
Dim FilePath As String
FilePath = ""
On Error Resume Next
FilePath = Dir("S:\National\Bureau d'études\2 - Base CAO\1 - Projet BE\*\1068*")
On Error GoTo 0
If FilePath = "" Then
MsgBox "File doesn't exist", vbInformation, "Kutools for Excel"
Else
MsgBox "File exist", vbInformation, "Kutools for Excel"
End If
Application.ScreenUpdating = False
End Sub
Merci d'avance.