Function ChoisirDossier()
Dim ObjShell, objFolder, SecuriteSlash As Byte
Set ObjShell = CreateObject("Shell.Application")
Set objFolder = ObjShell.BrowseForFolder(&H0&, "Choisissez un répertoire", &H1&, "c:\windows")
If objFolder Is Nothing Then GoTo EndProc
If Left(objFolder.self.Path, 2) = "::" Then GoTo EndProc
ChoisirDossier = objFolder.self.Path
SecuriteSlash = InStr(objFolder.Title, ":")
If SecuriteSlash > 0 Then ChoisirDossier = Left(ChoisirDossier, Len(ChoisirDossier) - 1)
EndProc:
Set objFolder = Nothing
Set ObjShell = Nothing
End Function