Hello
I am having trouble enabling filtering on a protected worksheet.
I have already enabled the +/- with the code listed below in VBA. It seems to be this that is causing the problem. When initially protecting the sheet I select ‘use Auto filter’ and I can sort using the filter buttons until the spreadsheet is closed and saved then it does not retain this information and I can no longer sort using the filter buttons i.e. if you unprotect and protect again excel usually remember what was ticked and the ‘use Auto filter’ is not selected.
I have tried protecting the sheet with the ‘Use Auto filter’ selected without the code in VBA and it works fine so it must be something to do with this. Is there an additional code I can add to VB to enable both functions.
Thanks in advance for your help
Kerry
_________________________________________________________________________
Option Explicit
Private Sub Workbook_Open()
Dim wsSheet1 As Worksheet
Set wsSheet1 = Me.Worksheets(1)
With wsSheet1
.EnableOutlining = True
.Protect Contents:=True, UserInterfaceOnly:=True
End With
End Sub
_____________________________________________________________
Bookmarks