1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Sub Bouton43_QuandClic()
'Sélection d'un dossier
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
Dim vrtSelectedItem As Variant
With fd
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
DirOpen = vrtSelectedItem
Next vrtSelectedItem
Else
DirOpen = VbNulllString
End If
End With
Set fd = Nothing
Workbooks(ThisWorkbook.Name).Worksheets("Feuil1").Range("E5") = DirOpen
ChDir "\\Fraix01fs01\Areva\Affaires\DT EN COURS\Temporaire"
DirOpen.SaveAs Filename:= _
"\\Fraix01fs01\Areva\Affaires\DT EN COURS\Temporaire\DTTemporaire.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub |
Partager