Sub Fiches_individuelles_Service1()
'
Sheets("Service1").Select
Range("B1:R1").Select
Selection.Copy
Sheets("Fiche individuelle 6 périodes").Select
Range("S3").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Sort Key1:=Range("S3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheets("Switch").Select
Range("K1").Select
ActiveCell.FormulaR1C1 = "Service1"
Sheets("Fiche individuelle 6 périodes").Select
Workbooks.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
Sheets.Add
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Administrateur\Bureau\Heures 2009\Récolte des fiches\Service1\Fiches individuelles Service1.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
'1. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil17").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'2. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[1]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil16").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'3. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[2]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil15").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'4. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[3]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil14").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'5. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[4]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'6. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[5]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil12").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'7. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[6]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'8. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[7]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'9. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[8]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil9").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'10. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[9]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil8").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'11. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[10]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'12. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[11]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'13. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[12]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'14. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[13]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'15. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[14]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'16. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[15]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)"
'17. fiche
Windows("Base.xls").Activate
Range("P3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[16]C[3]"
Range("B1:P66").Select
Selection.Copy
Windows("Fiches individuelles Service1.xls").Activate
Sheets("Feuil3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Name = Range("O3").Value
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$66"
Application.ExecuteExcel4Macro "PAGE.SETUP(,,0.7,0.2,0.2,0.2,,,TRUE,TRUE,1,9,true,,,,,0.2,0.2,FALSE,FALSE)
Windows("Base.xls").Activate
Sheets("Fiche individuelle 6 périodes").Select
Range("S3:S20").Select
Selection.Clear
End Sub