Sub SommBilans()
Dim FCible As Worksheet, FSourc As Worksheet
Set FCible = ThisWorkbook.Worksheets(1) "j'initialise le fichier Bilan,feuil1 a FCible"
DateDéb = Feuil1.[DateDéb].Value "je declare les valeurs DateDéb et DateFin que
DateFin = Feuil1.[DateFin].Value j'ai défini dans la feuil1 de mon fichier Bilan"
FCible.[B14:E20].Value = 0
FCible.[B28:E29].Value = 0
FCible.[B37:E42].Value = 0 "j'initialise les valeurs a 0 pour avoir une page vierge"
FCible.[B50:E51].Value = 0
FCible.[B59:E67].Value = 0
FCible.[B75😀75].Value = 0
While Month(DateDéb) <= Month(DateFin)
Workbooks.Open ThisWorkbook.Path & "\" & Format(DateDéb, "mmmm") & ".xls"
Set FSourc = ActiveWorkbook.Worksheets(5) "FSourc = classeur mois.xls feuil5"
FSourc.[B14:E20].Copy
FCible.[B14:E20].PasteSpecial Paste:=xlValues, Operation:=xlAdd
FSourc.[B28:E29].Copy
FCible.[B28:E29].PasteSpecial Paste:=xlValues, Operation:=xlAdd
FSourc.[B37:E42].Copy
FCible.[B37:E42].PasteSpecial Paste:=xlValues, Operation:=xlAdd
FSourc.[B50:E51].Copy
FCible.[B50:E51].PasteSpecial Paste:=xlValues, Operation:=xlAdd
FSourc.[B59:E67].Copy
FCible.[B59:E67].PasteSpecial Paste:=xlValues, Operation:=xlAdd
FSourc.[B75😀75].Copy
FCible.[B75😀75].PasteSpecial Paste:=xlValues, Operation:=xlAdd
ActiveWorkbook.Saved = True "fermeture du classeur mois afin d'éviter d'avoir
ActiveWorkbook.Close 10fichier d'ouvert a la fin de la macro"
DateDéb = DateSerial(Year(DateDéb), Month(DateDéb) + 1, 1)
If Month(DateDéb) = 1 Then Exit Sub
Wend
End Sub