Hi - I've been using the following and it works great; however, it also locks filter usage which users need access to. Is there a line of data I can add that would still protect keep everything protected but allow for my filters to be used on all sheets? I thought by unlocking the cells on the filter header row that would be enough, but they only seem to get locked again. I assume this is when I close out of the workbook the below runs and it locks all cells.
Thank you
VBA Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim xSheet As Worksheet
Dim xPsw As String
xPsw = "XXXXXXXXXX"
For Each xSheet In Worksheets
xSheet.Protect xPsw
Next
Thank you