Bonjour
Je viens de recuperer un fichier avec une macro mais elle bug et je ne comprends rien au macros help me please !!!
ci-dessous la ou ca bug (en gras)
Traitement Feuille SORTIES :
Sheets("SORTIES").Select
' Filtre sur Bassin :
Selection.AutoFilter Field:=5, Criteria1:=Bassin, Operator:=xlAnd
' Copie données visible uniquement sur feuille existante
Range("A1:M1000").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Windows(NomFichier & " " & Bassin & ".xls").Activate
Sheets("Feuil2").Select
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
Rows("2:2").Select
ActiveWindow.FreezePanes = True
Range("A1").Select
Sheets("Feuil2").Name = "SORTIES"
' Protection feuille
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Password:="benenoharet10", Scenarios:=True
' Retour sur fichier de base
Windows(NomFichierXls).Activate
merci de votre aide
Sheridana
Je viens de recuperer un fichier avec une macro mais elle bug et je ne comprends rien au macros help me please !!!
ci-dessous la ou ca bug (en gras)
Traitement Feuille SORTIES :
Sheets("SORTIES").Select
' Filtre sur Bassin :
Selection.AutoFilter Field:=5, Criteria1:=Bassin, Operator:=xlAnd
' Copie données visible uniquement sur feuille existante
Range("A1:M1000").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Windows(NomFichier & " " & Bassin & ".xls").Activate
Sheets("Feuil2").Select
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
Rows("2:2").Select
ActiveWindow.FreezePanes = True
Range("A1").Select
Sheets("Feuil2").Name = "SORTIES"
' Protection feuille
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Password:="benenoharet10", Scenarios:=True
' Retour sur fichier de base
Windows(NomFichierXls).Activate
merci de votre aide
Sheridana