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 29 30 31 32
| Option Explicit
Public nom As Variant, NomComplet As Variant
Public Dossier As Variant
Private Sub Parcourir_Click()
If MsgBox("Voulez-vous enregistrer le graphique ?", vbYesNo) = vbYes Then
Dim Repertoire As FileDialog
Set Repertoire = Application.FileDialog(msoFileDialogFolderPicker)
Repertoire.Show
If Repertoire.SelectedItems.Count > 0 Then
Dossier = Repertoire.SelectedItems(1)
MsgBox Dossier
Else
MsgBox "Aucun Répertoire de sauvegarde Sélectionné"
Exit Sub
End If
nom = InputBox("Donnez un nom de fichier !" & Chr(13) _
& "Selon cette structure :Données du graphique_Délai LUP QC_Ki_Nom", , "Nom du graphique")
If nom = "" Then Exit Sub
End If
NomComplet = Dossier & "\" & nom & ".xlsm"
MsgBox NomComplet
'End If
End Sub
Private Sub UserForm_Click()
Workbooks("Application Graphique.xlsm").Activate
ActiveWorkbook.SaveAs Filename:=NomComplet
End Sub |
Partager