I have a worksheet where all cells are protected, however, I would like to allow users to sort. I have selected the options for allowing 'sorting' and 'auto filer' when setting the password, however, I believe I must also have some kind of code in there as well.
I found the below code somewhere else which I am not sure will work, because I currently have code in there to allow users to group/ungroup on another sheet in the workbook. If the below code is correct, how would I incorporate this into my existing code as shown on the sample attached? If the code is incorrect, what would be the correct code and how should it be incorporating into the existing code? Thanks!
Private Sub Workbook_Open()
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:="", AllowSorting:=True