SilencioDubueno
New Member
- Joined
- May 26, 2022
- Messages
- 4
- Office Version
- 365
- 2021
- Platform
- Windows
Hello All!
I'm currently writing out a sub to protect specific sheets such that they can still be accessed and edited by macros, but people can still go and filter/sort the data tables freely. My understanding is this code should work:
The sheet is protected with this and can be edited by macros ald lets people filter, but will not allow people to sort data. When I run the code for another page that has a specific Edit Range, the code states that the macros on it cannot be run. I'm not 100% sure why there is a difference with the same code.
Any help is appreciated.
I'm currently writing out a sub to protect specific sheets such that they can still be accessed and edited by macros, but people can still go and filter/sort the data tables freely. My understanding is this code should work:
VBA Code:
Worksheets("Sheet1").protect Password:="Jeebus", UserInterfaceonly:=True, AllowSorting:=True, AllowFiltering:=True
The sheet is protected with this and can be edited by macros ald lets people filter, but will not allow people to sort data. When I run the code for another page that has a specific Edit Range, the code states that the macros on it cannot be run. I'm not 100% sure why there is a difference with the same code.
Any help is appreciated.