I have the following VBA code to protect multiple worksheets at once and allow users certain editing capabilities for unprotected cells, but I also want them to be able to select protected cells, just not edit them. What code do I need for this? TIA
Sub ProtectAll()
Dim wSheet As Worksheet
Dim Pwd As String
Pwd = InputBox("Enter your password to protect all worksheets", "Password Input")
For Each wSheet In Worksheets
wSheet.Protect Password:=Pwd, DrawingObjects:=False, Contents:=True, Scenarios:=False, _
AllowFormattingCells:=True, AllowFormattingColumns:=False, AllowFormattingRows:=False, _
AllowInsertingColumns:=False, AllowInsertingRows :=False, AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, AllowDeletingRows:=False, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Next wSheet
End Sub
Sub ProtectAll()
Dim wSheet As Worksheet
Dim Pwd As String
Pwd = InputBox("Enter your password to protect all worksheets", "Password Input")
For Each wSheet In Worksheets
wSheet.Protect Password:=Pwd, DrawingObjects:=False, Contents:=True, Scenarios:=False, _
AllowFormattingCells:=True, AllowFormattingColumns:=False, AllowFormattingRows:=False, _
AllowInsertingColumns:=False, AllowInsertingRows :=False, AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, AllowDeletingRows:=False, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Next wSheet
End Sub