Bonjour,
J'ai un fichier excel avec plusieurs feuille que je protège et déprotège avec une macro.
Quand mon fichier est protégé, je ne peux pas utiliser le filtre dans mes feuilles pourtant j'ai mis le AllowFiltering:=True lors de la protection?
Voici la macro que j'utilise pour protéger mes différents feuilles.
Merci de votre assistance,
Oiseaubleu
Sub Protéger()
Dim ws As Worksheet
Dim pwd As String
pwd = "(abc)"
Application.ScreenUpdating = False
For Each ws In Worksheets
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowFiltering:=True
ws.Protect Password:=pwd
Next ws
MsgBox "Feuilles protégées"
Application.ScreenUpdating = True
End Sub