STEVENS3010
Board Regular
- Joined
- Feb 4, 2020
- Messages
- 89
- Office Version
- 365
- 2016
- Platform
- Windows
Hi,
I have a code where it allows filtering on a protected sheet but when I'm trying to add the allow sorting feature I get the 'cannot edit protected sheet error message'.
The VBA code I'm using is below - I cannot see where I'm going wrong; can anybody help?
I have a code where it allows filtering on a protected sheet but when I'm trying to add the allow sorting feature I get the 'cannot edit protected sheet error message'.
The VBA code I'm using is below - I cannot see where I'm going wrong; can anybody help?
VBA Code:
With ActiveSheet
.Protect Password:="", AllowFiltering:=True, AllowSorting:=True
End With