Sub fusion_suivi()
'
' fusion_suivi Macro
' Macro enregistrée le 21/12/2006 par Masclet Jean Paul
'
'enleve le partage du classeur
ActiveWorkbook.ExclusiveAccess
Sheets("Suivi des Mineurs").Select
'enleve les protections
ActiveSheet.Unprotect
'Selectionne la table, place un filtre, selectionne les élements et les cooles dans la feuille cible
Sheets("Gestionnaire1").Select
ActiveSheet.Unprotect
Rows("13:13").Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 1
Range("B13").Select
Selection.AutoFilter Field:=2, Criteria1:="<>"
Range("A14:M4400").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Suivi des Mineurs").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
'Selectionne la table, place un filtre, selectionne les élements et les cooles dans la feuille cible
Sheets("Gestionnaire2").Select
ActiveSheet.Unprotect
Rows("13:13").Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 1
Range("B13").Select
Selection.AutoFilter Field:=2, Criteria1:="<>"
Range("A14:M4400").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Suivi des Mineurs").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
'Selectionne la table, place un filtre, selectionne les élements et les cooles dans la feuille cible
Sheets("Gestionnaire3").Select
ActiveSheet.Unprotect
Rows("13:13").Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 1
Range("B13").Select
Selection.AutoFilter Field:=2, Criteria1:="<>"
Range("A14:M4400").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Suivi des Mineurs").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
'Selectionne la table, place un filtre, selectionne les élements et les cooles dans la feuille cible
Sheets("Gestionnaire4").Select
ActiveSheet.Unprotect
Rows("13:13").Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 1
Range("B13").Select
Selection.AutoFilter Field:=2, Criteria1:="<>"
Range("A14:M4400").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Suivi des Mineurs").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
'Selectionne la table, place un filtre, selectionne les élements et les cooles dans la feuille cible
Sheets("Gestionnaire5").Select
ActiveSheet.Unprotect
Rows("13:13").Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 1
Range("B13").Select
Selection.AutoFilter Field:=2, Criteria1:="<>"
Range("A14:M4400").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Suivi des Mineurs").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
'Eleve tous les filtres
Sheets("Gestionnaire1").Activate
Range("B35").Select
Sheets("Gestionnaire1").Select
Rows("13:13").Select
Selection.AutoFilter
Sheets("Gestionnaire2").Select
Range("C13").Select
Selection.AutoFilter
ActiveWindow.SmallScroll Down:=-18
Sheets("Gestionnaire3").Select
Range("D13").Select
Selection.AutoFilter
Sheets("Gestionnaire4").Select
Range("C13").Select
Selection.AutoFilter
Sheets("Gestionnaire5").Select
Range("C13").Select
Selection.AutoFilter
Sheets("Suivi des Mineurs").Select
Sheets(Array("Gestionnaire1", "Gestionnaire2", "Gestionnaire3", "Gestionnaire4", _
"Gestionnaire5")).Select
Sheets("Gestionnaire1").Activate
ActiveWindow.SmallScroll Down:=-15
Range("A14:H4400").Select
Selection.ClearContents
Range("A13").Select
Sheets("Suivi des Mineurs").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Sheets("Gestionnaire1").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Sheets("Gestionnaire2").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Sheets("Gestionnaire3").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Sheets("Gestionnaire4").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Sheets("Gestionnaire5").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Sheets("Suivi des Mineurs").Select
ActiveWindow.SmallScroll Down:=0
Range("A13").Select
MsgBox "Les fichiers de suivi ont été fusionnés dans Suivi des Mineurs"