![]() |
|
Forum
|
|
|
#1 (permalink) |
|
Messages: n/a
|
re le forum ,
j'ai trouvé çà sur le net : =:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=: !=:!=:!=:!=:!=:! Sub essai1212() choix = ChoixDossierFichier("c:\", 1) '<- ici le chemin de tonchoix If choix <> "" Then MsgBox choix End Sub Function ChoixDossierFichier(Racine, Optional SelType As Byte = 0) Dim objShell, objFolder, Chemin, SecuriteSlash, FlagChoix&, Msg$ If SelType = 0 Then FlagChoix = &H1&: Msg = "Choisissez un dossier :" Else FlagChoix = &H4000&: Msg = "Choisissez un fichier :" End If Set objShell = CreateObject("Shell.Application") 'le troisième paramètre permet de choisir 'la sélection d'un dossier ou d'un fichier (0 ou 1) 'le dernier paramètre permet de choisir le dossier racine Set objFolder = objShell.BrowseForFolder(&H0&, Msg, FlagChoix, Racine) On Error Resume Next Chemin = objFolder.ParentFolder.ParseName(objFolder.Title). Path & "" If objFolder.Title = "Bureau" Then Chemin = "C:\Windows\Bureau" End If If objFolder.Title = "" Then Chemin = "" End If SecuriteSlash = InStr(objFolder.Title, ":") If SecuriteSlash > 0 Then Chemin = Mid(objFolder.Title, SecuriteSlash - 1, 2) & "" End If ChoixDossierFichier = Chemin End Function =:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=:!=: !=:!=:!=:!=:!=:! Sous office xp j'ai bien un bouton "créer un nouveau dossier" mais sous 2000 je ne l'ai pas, il n'y aurais pas une solution ? Je tiens vraiment à adapter cette boite dialogue pour excel 2000!! Merci par avance de votre aide, Romfret @+, romfret |
| ANNONCES | |
| Outils de la discussion | |
|
|