Filtering lists while sheet is protected.

dlangham

New Member
Joined
Feb 28, 2003
Messages
12


:idea:

I am working in Excel 97 and have found that I cannot filter lists while the worksheet is protected. Is there any way to get around this limitation?

Thanks in advance for your help. :idea:

David
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I don't think there is but someone might know different. If you are filtering via a macro, I'm afraid you will have to add a couple of lines of code to unprotect your sheet > filter > protect it again. Hope this helps.
 
Upvote 0
FYI, That capability is available in xl2k2 but not 97 for AutoFilters. Otherwise as Jotoya said you'd need to sandwich your filter code between unprotect and protect lines.
 
Upvote 0
Actually, is quite easy to get it working in 97. Put this in the Workbook module, and change the sheet name and the password to suit yours:

<font face=Courier New>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_Open()
    <SPAN style="color:#00007F">With</SPAN> Sheets("Hoja1")
        .Protect "password", , , , <SPAN style="color:#00007F">True</SPAN>
        .EnableAutoFilter = <SPAN style="color:#00007F">True</SPAN>
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>

it assumes that the AutoFilter is already turned on.
 
Upvote 0
OK,

I have recorded a macro that will unprotect before filtering and protect after, however, I need greater control so that the user can only work with the filter fields.
So after unprotecting the worksheet, if I have a list with 4 columns; Region, Territory, Salesman and Amount I need a macro that will enble the user to select the column/cell to filter (Region, Territory, Salesman)and enable the action, then re-protect the WS.

:-?
 
Upvote 0
dlangham said:
OK,

I have recorded a macro that will unprotect before filtering and protect after, however, I need greater control so that the user can only work with the filter fields.
So after unprotecting the worksheet, if I have a list with 4 columns; Region, Territory, Salesman and Amount I need a macro that will enble the user to select the column/cell to filter (Region, Territory, Salesman)and enable the action, then re-protect the WS.

:-?

David, try using the method I posted above (Which is the same as Richie linked to...)
 
Upvote 0
FWIW, that method also works for enabling Outlining, which is STILL not available in XP (Mhm...have to check 2003 to see if they have included it in that one...)
 
Upvote 0

Forum statistics

Threads
1,223,941
Messages
6,175,537
Members
452,652
Latest member
eduedu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top