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
	
	
	
	
	
		
	
		
			
		
		
	
				
			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