Bonjour, j'ai un script pour selectionner un répertoire:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
Const BIF_EDITBOX = &H10 
Const BIF_NEWDIALOGSTYLE = &H40 
Set sa = CreateObject("Shell.Application") 
Set Folder = sa.BrowseForFolder(0, "My Computer:", BIF_EDITBOX Or BIF_NEWDIALOGSTYLE) 
BrowseAndCreate = Folder.items.Item.Path
Je voudrai que si l'utlisateur ne selectionne pas de répertoire la fenêtre se réouvre, j'ai essayer comme suit:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
sub boucle1
 
Const BIF_EDITBOX = &H10 
Const BIF_NEWDIALOGSTYLE = &H40 
Set sa = CreateObject("Shell.Application") 
Set Folder = sa.BrowseForFolder(0, "My Computer:", BIF_EDITBOX Or BIF_NEWDIALOGSTYLE) 
if Folder.items.Item.Path = "" then boucle1 
 
BrowseAndCreate = Folder.items.Item.Path 
 
end sub
mais ca ne fonctionne pas, sauriez vous m'aider ?