• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA - Allow filtering and sorting on Protected Sheet

cacos

Member
Hi everyone!

I'm facing quite a challenge on this one. I have a table on a worksheet that needs to stay locked (users can't modifiy the cells) but still users should be able to filter and sort that table.

I have tried everything and saw forum solutions but none work.

Here's my best shot so far (useless):

Code:
With Sheet1

.Protect Password:="test", AllowFiltering:=True, AllowSorting:=True, userinterfaceonly:=True
        .EnableAutoFilter = True
        .EnableSelection = xlNoRestrictions
       
       
End With

Thanks!!
 
Thanks Narayan! The worksheet_selectionchange approach works. It's weird this can't be handled from the sheet.protect command.

Thanks again
 
Back
Top