OVH Cloud OVH Cloud

interface recherche fichier

2 réponses
Avatar
Patrice FY
Bonjour,

Je souhaite sur l'appui d'un bouton de commande ouvrir
l'interface de recherche de fichier avec un chemin
particulier? COMMENT FAIRE SVP

Merci

2 réponses

Avatar
papou
Bonjour
Private Sub CommandButton1_Click()
ChDir "C:Doc"
Application.Dialogs(xlDialogOpen).Show
End Sub
Cordialement
Pascal

"Patrice FY" a écrit dans le message
de news:12d701c4a072$74a62d20$
Bonjour,

Je souhaite sur l'appui d'un bouton de commande ouvrir
l'interface de recherche de fichier avec un chemin
particulier? COMMENT FAIRE SVP

Merci


Avatar
papou
Re
Pour compléter car peut-être que la question va venir ;-)
Private Sub CommandButton1_Click()
ChDir "C:Doc"
FichierAOuvrir = Application.Dialogs(xlDialogOpen).Show
If FichierAOuvrir <> False Then
MsgBox "Fichier ouvert : " & vbLf _
& ActiveWorkbook.FullName _
, vbInformation, "Pour info"
Else: MsgBox "L'ouverture de fichier a été annulée", vbInformation, "Pour
info": Exit Sub
End If
End Sub

Cordialement
Pascal

"papou" <cestpasbonpapou@çanonplus44.fr> a écrit dans le message de
news:
Bonjour
Private Sub CommandButton1_Click()
ChDir "C:Doc"
Application.Dialogs(xlDialogOpen).Show
End Sub
Cordialement
Pascal

"Patrice FY" a écrit dans le message
de news:12d701c4a072$74a62d20$
Bonjour,

Je souhaite sur l'appui d'un bouton de commande ouvrir
l'interface de recherche de fichier avec un chemin
particulier? COMMENT FAIRE SVP

Merci