View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JP[_3_] JP[_3_] is offline
external usenet poster
 
Posts: 168
Default Filter a protected shared worksheet

Just to add to the previous comment. You should be enabling autofilter
before protecting/sharing the sheet.

1. Enable autofilter by going to Data|Autofilter or
Selection.Autofilter in your code.
2. Protect the sheet and allow autofilter to be used:
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, AllowFiltering:=True

3. Share the workbook (can't recall how to do this in code, sorry)


HTH,
JP

On Nov 14, 6:25 am, Neill wrote:
How can I filter a protected shared worksheet?
I have allowed filtering in protection & can filter the protected worksheet
manually but if I try using vba it says its protected. I can't unprotect then
filter because it's a shared workbook.

Command used to try to filter is:
Selection.AutoFilter Field:=3, Criteria1:="LK", VisibleDropDown:=False
--
Regards
Neill