Hi
I have a protected sheet that has an autofilter applied to it on range A2:G5000. 'Use Autofilter' is selected in the Protect Sheet dialog box, and I can manually use the autofilters without a problem.
However, in my code I was having some issues with the Freeze Panes aspect, so I recorded myself removing freeze panes and adding it again, and with a bit of tinkering came up with the following:
This works fine when the sheet is not protected, but even though I can manually do this process fine with a protected sheet, I get a runtime 1004 error at the first line above advising me 'You cannot use this command on a protected sheet'. I can't just unprotect the sheet as this will be a shared spreadsheet.
Any ideas why this might be happening?
Bookmarks