Hi all,
I am using the below code to show all data every time a specific workbook is opened, however if I protect the sheet and share it then it does not work.
When I've protected it I have ticked the box to allow the use of Auto-Filter but the code does not work.
Can anyone help please?
I am using the below code to show all data every time a specific workbook is opened, however if I protect the sheet and share it then it does not work.
When I've protected it I have ticked the box to allow the use of Auto-Filter but the code does not work.
Code:
Private Sub Workbook_Open()
Dim sh As Variant
For Each sh In Worksheets
If sh.FilterMode Then sh.ShowAllData
Next
End Sub
Can anyone help please?