Re : filtre automatique: trie croissant et decroissant ne fonctionne plus après prote
voici mon code :
Private Sub Workbook_Open()
Dim mdp As String
Application.ScreenUpdating = False
ActiveSheet.Unprotect "loulou"
On Error Resume Next
ActiveSheet.ShowAllData
Columns("A:F").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
Selection.AutoFilter Field:=1, Criteria1:="<>", Operator:=xlAnd
Feuil1.EnableAutoFilter = True
ActiveSheet.Protect "loulou", UserInterfaceOnly:=True
Application.ScreenUpdating = True
End Sub
je viens de modifier mon profil, désolé de ne pas l'avoir fait plus tot
sinon j'ai bien déproteger en debut et reproteger après !!
mon code marche très bien.
mais lorsque je suis dans excel impossible de faire un trie croissant ou decroissant avec les filtres auto.
lorsque je protège la feuille en faisant outil protection et proteger la feuille les options sont bien visible = Tri mais comment mettre cette option dans ma macro
j'ai mi un exemple en fichier joint