XL 2019 Protection classeur

  • Initiateur de la discussion Initiateur de la discussion KTM
  • Date de début Date de début

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

KTM

XLDnaute Impliqué
Bonjour chers tous
J'utilise le code ci dessous pour protéger mon classeur.
j'aimerais savoir comment l'ajuster pour autoriser la sélection des cellules. Merci
VB:
Sub Protect()
Application.ScreenUpdating = False
Dim sh As Worksheet
    For Each sh In ThisWorkbook.Worksheets
        With sh
            .Visible = xlSheetVisible
            .Unprotect Password:="0000"
            .EnableAutoFilter = True
            .EnableOutlining = True
            .Cells.Locked = False
            On Error Resume Next
            .Cells.SpecialCells(xlCellTypeFormulas, 23).Locked = True
            .Cells.SpecialCells(xlCellTypeConstants, 2).Locked = False
            On Error GoTo 0
            .Protect Password:="0000", _
                     AllowFormattingCells:=True, _
                     AllowFormattingColumns:=True, _
                     AllowFormattingRows:=True, _
                     AllowInsertingColumns:=True, _
                     AllowInsertingRows:=True, _
                     AllowInsertingHyperlinks:=True, _
                     AllowDeletingColumns:=True, _
                     AllowDeletingRows:=True, _
                     AllowSorting:=True, _
                     AllowFiltering:=True, _
                     AllowUsingPivotTables:=True, _
                     userinterfaceonly:=True
        End With
 
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Réponses
2
Affichages
546
Réponses
4
Affichages
898
Réponses
3
Affichages
1 K
Retour