1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Sub creer_fiche()
Cells.Select
Selection.Copy
Workbooks.Add
Cells.Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Dim dossier As String, fiche As String
dossier = Cells(2, 2)
fiche = Cells(2, 3)
ActiveWorkbook.SaveAs Filename:= _
"\\toto\titi_DossierElec\" & dossier& "\" & fiche& ."xlsm", FileFormat _
:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWorkbook.Close
End Sub |
Partager