I have the below code which will automatically reset filters when saved.
However, I need this to operate in a Shared Workbook.

How can I get the filters to reset when the workbook is saved, in a shared workbook please?

Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveSheet.Unprotect Password:="xxxxx"

On Error Resume Next
ActiveSheet.ShowAllData
Err.Clear


ActiveSheet.Protect Password:="xxxxx", AllowFiltering:=True
    Range("A2").Select
End Sub